# Generated by Django 2.1.7 on 2019-08-24 19:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('account', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='case',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('case_number', models.IntegerField(max_length=100, unique=True)),
                ('case_info', models.TextField()),
                ('deadline', models.DateField(null=True)),
                ('status', models.CharField(choices=[('Under Investigation', 'Under Investigation'), ('Completed', 'Completed'), ('Cancelled', 'Cancelled')], default='Under Investigation', max_length=100)),
                ('investigation_head', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='case_inv_head', to='account.UserProfile')),
                ('members', models.ManyToManyField(blank=True, related_name='case_members', to='account.UserProfile')),
            ],
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('report', models.TextField()),
                ('report_case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='case.case')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('case_number', models.IntegerField(max_length=100)),
                ('task_number', models.IntegerField(max_length=100)),
                ('task_info', models.TextField()),
                ('deadline', models.DateField(null=True)),
                ('task_status', models.CharField(choices=[('Ongoing', 'Ongoing'), ('Completed', 'Completed'), ('Cancelled', 'Cancelled')], default='Ongoing', max_length=100)),
                ('investigation_head', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='task_inv_head', to='account.UserProfile')),
                ('task_case', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='case.case')),
                ('task_member', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='task_member', to='account.UserProfile')),
            ],
        ),
        migrations.AddField(
            model_name='report',
            name='report_task',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='case.Task'),
        ),
        migrations.AddField(
            model_name='report',
            name='report_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='account.UserProfile'),
        ),
    ]
