# Generated by Django 3.2.7 on 2021-09-21 10:57

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.CharField(choices=[('therapist', 'Терапевт'), ('surgeon', 'Хирург')], default='therapist', max_length=255, verbose_name='Терапевт/Хирург')),
                ('name', models.CharField(max_length=255, verbose_name='ФИО')),
                ('pin', models.CharField(max_length=4, verbose_name='ПИН')),
                ('birthdate', models.DateField(verbose_name='Дата рождения')),
                ('phone', models.CharField(max_length=10, verbose_name='Номер телефона')),
                ('hospital', models.ForeignKey(default=1, on_delete=django.db.models.deletion.PROTECT, to='main.hospital', verbose_name='Больница')),
            ],
            options={
                'verbose_name': 'Личаший врач',
                'verbose_name_plural': 'Личашие врач',
            },
        ),
        migrations.CreateModel(
            name='Nurses',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='ФИО')),
                ('pin', models.CharField(max_length=4, verbose_name='ПИН')),
                ('birthdate', models.DateField(verbose_name='Дата рождения')),
                ('phone', models.CharField(max_length=10, verbose_name='Номер телефона')),
            ],
            options={
                'verbose_name': 'Медсестра',
                'verbose_name_plural': 'Медсестры',
            },
        ),
        migrations.CreateModel(
            name='Patients',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='ФИО')),
                ('pin', models.CharField(max_length=4, verbose_name='ПИН')),
                ('birthdate', models.DateField(verbose_name='Дата рождения')),
                ('phone', models.CharField(max_length=10, verbose_name='Номер телефона')),
                ('reason', models.CharField(max_length=255, verbose_name='')),
                ('doctor', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counts', to='main.doctor', verbose_name='Личаший врач')),
                ('hospital', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.hospital', verbose_name='Больница')),
                ('nurse', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='main.nurses', verbose_name='Медсестра')),
            ],
            options={
                'verbose_name': 'Пациент',
                'verbose_name_plural': 'Поциенты',
            },
        ),
        migrations.AddField(
            model_name='doctor',
            name='nurse',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Медсестра', to='main.nurses'),
        ),
    ]
