# Generated by Django 3.2.4 on 2021-07-02 14:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50, verbose_name='Ф.И.О')),
                ('pin_code', models.CharField(default='', max_length=30, verbose_name='ПИН-Код паспорта')),
                ('age', models.PositiveIntegerField(default=0, verbose_name='Возраст')),
                ('stage', models.PositiveIntegerField(default=0, verbose_name='Стаж')),
                ('number_tel', models.CharField(default='', max_length=20, verbose_name='Номер телефона')),
                ('work_profession', models.CharField(choices=[('Хирург', 'Хирург'), ('Терапевт', 'Терапевт')], default='Терапевт', max_length=10)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HeadDoctor',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50, verbose_name='Ф.И.О')),
                ('pin_code', models.CharField(default='', max_length=30, verbose_name='ПИН-Код паспорта')),
                ('age', models.PositiveIntegerField(default=0, verbose_name='Возраст')),
                ('stage', models.PositiveIntegerField(default=0, verbose_name='Стаж')),
                ('number_tel', models.CharField(default='', max_length=20, verbose_name='Номер телефона')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Hospital',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=100, verbose_name='Больница')),
                ('ocpo', models.IntegerField(blank=True, unique=True, verbose_name='ОКПО')),
                ('hospital_type', models.IntegerField(choices=[(1, 'Государственная'), (2, 'Частная')], default=1)),
                ('take_region', models.CharField(choices=[('Чуйская', 'Чуйская область'), ('Таллаская', 'Таласская область'), ('Нарынская', 'Нарынская область'), ('Баткенская', 'Баткенская область'), ('Иссык-Кульская', 'Исык-Кульская область'), ('Джалал-Абадская', 'Джалал-Абадская область'), ('Ошская', 'Ошская область')], default='Чуйская', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Nurse',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50, verbose_name='Ф.И.О')),
                ('pin_code', models.CharField(default='', max_length=30, verbose_name='ПИН-Код паспорта')),
                ('age', models.PositiveIntegerField(default=0, verbose_name='Возраст')),
                ('stage', models.PositiveIntegerField(default=0, verbose_name='Стаж')),
                ('number_tel', models.CharField(default='', max_length=20, verbose_name='Номер телефона')),
                ('head_doctor', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.DO_NOTHING, to='hospital.headdoctor')),
                ('hospital', models.ForeignKey(default=True, on_delete=django.db.models.deletion.DO_NOTHING, to='hospital.hospital')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=50, verbose_name='Ф.И.О пациента')),
                ('doctor', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.DO_NOTHING, to='hospital.doctor')),
                ('nurse', models.ForeignKey(blank=True, default=True, on_delete=django.db.models.deletion.DO_NOTHING, to='hospital.nurse')),
            ],
        ),
        migrations.AddField(
            model_name='headdoctor',
            name='hospital',
            field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, to='hospital.hospital', verbose_name='Место работы'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='head_doctor',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.DO_NOTHING, to='hospital.headdoctor'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='hospital',
            field=models.ForeignKey(default=True, on_delete=django.db.models.deletion.DO_NOTHING, to='hospital.hospital'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='nurse',
            field=models.ForeignKey(blank=True, default=True, on_delete=django.db.models.deletion.DO_NOTHING, to='hospital.nurse'),
        ),
    ]
