# Generated by Django 2.2.3 on 2019-07-13 00:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('did', models.IntegerField(primary_key=True, serialize=False)),
                ('dname', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Nurse',
            fields=[
                ('nid', models.IntegerField(primary_key=True, serialize=False)),
                ('nname', models.CharField(max_length=10)),
                ('departments', models.ManyToManyField(to='nursetask.Department')),
            ],
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('rid', models.IntegerField(primary_key=True, serialize=False)),
                ('rname', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Supervisor',
            fields=[
                ('sid', models.IntegerField(primary_key=True, serialize=False)),
                ('sname', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('tid', models.IntegerField(primary_key=True, serialize=False)),
                ('tname', models.CharField(max_length=10)),
                ('tdate', models.DateField()),
                ('did', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nursetask.Department')),
                ('nid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nursetask.Nurse')),
            ],
        ),
        migrations.AddField(
            model_name='nurse',
            name='sid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nursetask.Supervisor'),
        ),
        migrations.CreateModel(
            name='Facility',
            fields=[
                ('fid', models.IntegerField(primary_key=True, serialize=False)),
                ('fname', models.CharField(max_length=10)),
                ('rid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nursetask.Region')),
            ],
        ),
        migrations.AddField(
            model_name='department',
            name='fid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nursetask.Facility'),
        ),
    ]
