# Generated by Django 3.2 on 2021-04-30 18:28

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Donor',
            fields=[
                ('donorId', models.CharField(help_text='Donor ID is for unique identification.', max_length=128, primary_key=True, serialize=False)),
                ('doctorId', models.CharField(blank=True, max_length=128)),
                ('name', models.CharField(help_text='Enter your name', max_length=32)),
                ('age', models.PositiveIntegerField(default=18, help_text='Enter your age')),
                ('sex', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other')], default='M', max_length=1)),
                ('address', models.CharField(help_text='Enter your address', max_length=128)),
                ('phone', models.CharField(help_text='Enter your mobile number of 10 digits', max_length=10)),
                ('email', models.EmailField(max_length=32)),
                ('bloodType', models.CharField(choices=[('A+', 'A+'), ('A-', 'A-'), ('B+', 'B+'), ('B-', 'B-'), ('O+', 'O+'), ('O-', 'O-'), ('AB+', 'AB+'), ('AB-', 'AB-')], max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='Donation',
            fields=[
                ('donationId', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField(default=datetime.date.today)),
                ('bloodType', models.CharField(max_length=3)),
                ('isApproved', models.CharField(choices=[('Y', 'Yes'), ('N', 'No'), ('P', 'Pending')], default='P', max_length=1)),
                ('quantity', models.PositiveIntegerField()),
                ('donorId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Donor.donor')),
            ],
            options={
                'ordering': ['-date'],
            },
        ),
    ]
