# Generated by Django 3.1.5 on 2021-10-18 06:38

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('covid', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Consequence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('consequence', models.CharField(max_length=255, verbose_name='Последствие')),
            ],
            options={
                'verbose_name': 'Последствие болезни',
                'verbose_name_plural': 'Последствия болезни',
                'ordering': ('consequence',),
            },
        ),
        migrations.CreateModel(
            name='DiseaseName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('disease_name', models.CharField(max_length=255, verbose_name='Болезнь')),
            ],
            options={
                'verbose_name': 'Болезнь',
                'verbose_name_plural': 'Болезни',
                'ordering': ('disease_name',),
            },
        ),
        migrations.CreateModel(
            name='HealthStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('health_status', models.CharField(max_length=255, verbose_name='Состояние здоровья')),
            ],
            options={
                'verbose_name': 'Состояние здоровья',
                'verbose_name_plural': 'Состояния здоровья',
                'ordering': ('health_status',),
            },
        ),
        migrations.CreateModel(
            name='Disease',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('disease_kind', models.IntegerField(choices=[(1, 'Карантин'), (2, 'Болезнь')], verbose_name='Тип записи')),
                ('date_of_application', models.DateField(blank=True, null=True, verbose_name='Дата обращения к врачу')),
                ('date_of_analysis', models.DateField(blank=True, null=True, verbose_name='Дата сдачи анализа')),
                ('date_of_confirmation', models.DateField(blank=True, null=True, verbose_name='Дата получения результата анализа')),
                ('date_of_begin', models.DateField(blank=True, null=True, verbose_name='Дата начала больничного/карантина')),
                ('date_of_end', models.DateField(blank=True, null=True, verbose_name='Дата окончания больничного/карантина')),
                ('diagnosis', models.TextField(blank=True, null=True, verbose_name='Диагноз')),
                ('where_treated', models.IntegerField(choices=[(1, 'Дома'), (2, 'В учреждении здравоохранения')], verbose_name='Где лечится')),
                ('extra_data', models.TextField(blank=True, null=True, verbose_name='Дополнительная информация')),
                ('consequence', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='disease.consequence', verbose_name='Последствие болезни')),
                ('disease', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='disease.diseasename', verbose_name='Болезнь')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='covid.employee', verbose_name='Сотрудник')),
                ('health_status', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='disease.healthstatus', verbose_name='Состояние здоровья')),
            ],
            options={
                'verbose_name': 'Больничный/карантин',
                'verbose_name_plural': 'Больничные/карантины',
                'ordering': ('employee',),
            },
        ),
    ]
