# Generated by Django 3.2 on 2021-11-11 17:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Nurse',
            fields=[
                ('name', models.CharField(max_length=50)),
                ('NRIC', models.CharField(max_length=9, primary_key=True, serialize=False)),
                ('speed', models.IntegerField(default=10)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('name', models.CharField(max_length=50)),
                ('NRIC', models.CharField(max_length=9, primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='VaccinationCenter',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('max_capacity', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='NurseAvailability',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('time_slot', models.IntegerField(choices=[(1, 'AM10_AM11'), (2, 'AM11_PM12'), (3, 'PM12_PM01'), (4, 'PM01_PM02'), (5, 'PM02_PM03'), (6, 'PM03_PM04'), (7, 'PM04_PM05'), (8, 'PM05_PM06')], default=booking.models.TimeSlotChoices['AM10_AM11'])),
                ('NRIC', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='booking.nurse')),
                ('center', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='booking.vaccinationcenter')),
            ],
        ),
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('date', models.DateField()),
                ('time_slot', models.IntegerField(choices=[(1, 'AM10_AM11'), (2, 'AM11_PM12'), (3, 'PM12_PM01'), (4, 'PM01_PM02'), (5, 'PM02_PM03'), (6, 'PM03_PM04'), (7, 'PM04_PM05'), (8, 'PM05_PM06')], default=booking.models.TimeSlotChoices['AM10_AM11'])),
                ('NRIC', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='booking.user')),
                ('center', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='booking.vaccinationcenter')),
            ],
        ),
        migrations.AddConstraint(
            model_name='nurseavailability',
            constraint=models.UniqueConstraint(fields=('NRIC', 'date', 'time_slot', 'center'), name='nurse_availability'),
        ),
    ]
