# Generated by Django 3.0.5 on 2020-05-20 07:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='doctors',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dname', models.CharField(max_length=100, unique=True)),
                ('specality', models.CharField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='hospital',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hname', models.CharField(max_length=100, null=True)),
                ('location', models.CharField(max_length=100, null=True)),
                ('doctor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='doctord', to='basic_app.doctors')),
            ],
            options={
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, null=True)),
                ('Emailid', models.EmailField(max_length=254)),
                ('sex', models.CharField(choices=[('M', 'Male'), ('F', 'Female')], max_length=1)),
                ('date_of_birth', models.DateField(max_length=8)),
                ('age', models.IntegerField(null=True)),
                ('height', models.FloatField()),
                ('Weight', models.FloatField()),
                ('contact_Number', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
                ('bmi', models.FloatField(null=True)),
                ('cause', models.CharField(choices=[('A', 'accident'), ('B', 'surgery'), ('C', 'pneumonia'), ('D', 'Infection'), ('E', 'Cardiac Arrhythmiac')], max_length=1)),
                ('date_of_admited', models.DateField(max_length=8)),
                ('date_of_discharge', models.DateField(max_length=8)),
                ('daysadmited', models.IntegerField(null=True)),
                ('doctor_assigned', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='doctorh', to='basic_app.doctors', to_field='dname')),
                ('hospitalname', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='patients', to='basic_app.hospital')),
            ],
            options={
                'managed': True,
            },
        ),
    ]
