# Generated by Django 3.1.4 on 2020-12-27 05:15

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Case',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('disease', models.CharField(max_length=100)),
                ('symptoms', models.CharField(max_length=200)),
                ('status', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Firstname', models.CharField(max_length=50)),
                ('Lastname', models.CharField(max_length=50)),
                ('qualification', models.CharField(blank=True, max_length=100)),
                ('Contact', models.BigIntegerField(default=122)),
                ('Year_of_experience', models.IntegerField(default=2)),
                ('Clinic_name', models.CharField(max_length=50)),
                ('Specialazion', models.CharField(max_length=50)),
                ('address', models.CharField(blank=True, max_length=500)),
                ('city', models.CharField(default='', max_length=50)),
                ('state', models.CharField(blank=True, max_length=50)),
                ('Gender', models.CharField(default='', max_length=10)),
                ('birthdate', models.DateField(blank=True, default='')),
                ('location', models.CharField(blank=True, max_length=30)),
                ('about_doc', models.CharField(blank=True, max_length=100)),
                ('profile_pic', models.FileField(default='doc_male.png', upload_to='doctorfinder/img/')),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Firstname', models.CharField(max_length=50)),
                ('Lastname', models.CharField(max_length=50)),
                ('Contact', models.BigIntegerField(default=122)),
                ('Address', models.CharField(max_length=100)),
                ('Gender', models.CharField(max_length=20)),
                ('city', models.CharField(max_length=50)),
                ('state', models.CharField(blank=True, max_length=50)),
                ('birthdate', models.DateField(blank=True, default='')),
                ('blood_group', models.CharField(blank=True, max_length=10)),
                ('blood_presure', models.CharField(blank=True, max_length=10)),
                ('sugar', models.CharField(blank=True, max_length=10)),
                ('Haemoglobin', models.CharField(blank=True, max_length=10)),
                ('profile_pic', models.FileField(default='patient_icon.png', upload_to='doctorfinder/img/')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Email', models.EmailField(max_length=50)),
                ('Password', models.CharField(max_length=50)),
                ('Role', models.CharField(max_length=50)),
                ('Otp', models.CharField(max_length=50)),
                ('is_create', models.DateTimeField(auto_now_add=True)),
                ('is_update', models.DateTimeField(auto_now_add=True)),
                ('is_verified', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Prescription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attachment_file', models.FileField(upload_to='')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('case_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.case')),
                ('doctor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.doctor')),
                ('patient_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.patient')),
            ],
        ),
        migrations.CreateModel(
            name='Pharmacy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Firstname', models.CharField(max_length=50)),
                ('Lastname', models.CharField(max_length=50)),
                ('Contact', models.BigIntegerField(default=122)),
                ('Address', models.CharField(max_length=50)),
                ('Drug_name', models.CharField(max_length=50)),
                ('Prescription', models.CharField(max_length=50)),
                ('Gender', models.CharField(max_length=20)),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.user')),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(max_length=200)),
                ('customer_id', models.CharField(max_length=300)),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.user')),
            ],
        ),
        migrations.AddField(
            model_name='patient',
            name='user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.user'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='user_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.user'),
        ),
        migrations.AddField(
            model_name='case',
            name='doctor_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.doctor'),
        ),
        migrations.AddField(
            model_name='case',
            name='patient_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.patient'),
        ),
        migrations.CreateModel(
            name='availability',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('avail_date', models.DateField()),
                ('start_time', models.CharField(max_length=100)),
                ('status', models.BooleanField(default=False)),
                ('doctor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.doctor')),
            ],
        ),
        migrations.CreateModel(
            name='Appointment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('appointment_status', models.BooleanField(default=False)),
                ('payment_status', models.BooleanField(default=False)),
                ('availability_id', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='app.availability')),
                ('doctor_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.doctor')),
                ('patient_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.patient')),
            ],
        ),
    ]
