# Generated by Django 3.2 on 2021-04-24 18:23

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('clinic', '0001_initial'),
        ('finance', '0001_initial'),
        ('medicine', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='tonhang',
            name='thuoc',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='medicine.thuoc'),
        ),
        migrations.AddField(
            model_name='nhaphang',
            name='hoa_don',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hoa_don_nhap_hang', to='finance.hoadonnhaphang'),
        ),
        migrations.AddField(
            model_name='nhaphang',
            name='thuoc',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='nhap_hang_thuoc', to='medicine.thuoc'),
        ),
        migrations.AddField(
            model_name='hoadonxuathang',
            name='nguoi_phu_trach',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='hoadonvattu',
            name='nguoi_phu_trach',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='hoadontonhang',
            name='nguoi_phu_trach',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='hoadontong',
            name='benh_nhan',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hoa_don_tong_nguoi_dung', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='hoadontong',
            name='hoa_don_chuoi_kham',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='finance.hoadonchuoikham'),
        ),
        migrations.AddField(
            model_name='hoadontong',
            name='hoa_don_lam_sang',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='finance.hoadonlamsang'),
        ),
        migrations.AddField(
            model_name='hoadontong',
            name='hoa_don_thuoc',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='finance.hoadonthuoc'),
        ),
        migrations.AddField(
            model_name='hoadontong',
            name='lich_hen',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='hoa_don_lich_hen', to='clinic.lichhenkham'),
        ),
        migrations.AddField(
            model_name='hoadonthuoc',
            name='don_thuoc',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hoa_don_thuoc', to='medicine.donthuoc'),
        ),
        migrations.AddField(
            model_name='hoadonnhaphang',
            name='nguoi_phu_trach',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='hoadonlamsang',
            name='lich_hen',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hoa_don_lam_sang', to='clinic.lichhenkham'),
        ),
        migrations.AddField(
            model_name='hoadonchuoikham',
            name='chuoi_kham',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hoa_don_dich_vu', to='clinic.chuoikham'),
        ),
    ]
