# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-08-19 10:22
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, default='', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Hospital',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, default='', max_length=200)),
                ('city', models.CharField(default='', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='MedicalExamination',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(verbose_name='exam date')),
                ('result', models.CharField(choices=[('Healty', 'Healty'), ('Corona', 'Corona'), ('Botism', 'Botism'), ('Dead', 'Dead')], default='Healty', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('department_in', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apphospital.Department')),
            ],
        ),
        migrations.CreateModel(
            name='People',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, default='', max_length=200)),
                ('age', models.CharField(blank=True, default=0, max_length=200)),
                ('gender', models.CharField(choices=[('Male', 'Male'), ('Female', 'Female'), ('Other', 'Other')], default='Male', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Worker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(choices=[('Doctor', 'Doctor'), ('Nurse', 'Nurse')], default='Doctor', max_length=50)),
                ('department', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='worker_department', to='apphospital.Department')),
                ('people', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='worker_person', to='apphospital.People')),
            ],
        ),
        migrations.AddField(
            model_name='patient',
            name='people',
            field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='patient_person', to='apphospital.People'),
        ),
        migrations.AddField(
            model_name='medicalexamination',
            name='patient',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apphospital.Patient'),
        ),
        migrations.AddField(
            model_name='medicalexamination',
            name='worker',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='apphospital.Worker'),
        ),
        migrations.AddField(
            model_name='department',
            name='hospital',
            field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='departments', to='apphospital.Hospital'),
        ),
    ]
