# Generated by Django 2.1.4 on 2018-12-21 11:23

import datetime
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0004_auto_20180809_0613'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField(null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='imgs/')),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField(null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='imgs/')),
                ('course', models.ManyToManyField(to='api.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField(null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='imgs/')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Subject')),
            ],
        ),
        migrations.CreateModel(
            name='UserQuestionWiseResponse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('userIntAnswer', models.IntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(9), django.core.validators.MinValueValidator(0)])),
                ('isMarkedForReview', models.BooleanField(default=False)),
                ('status', models.CharField(choices=[('correct', 'correct'), ('incorrect', 'incorrect'), ('unattempted', 'unattempted')], default='unattempted', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='UserSectionWiseResult',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('marksObtained', models.FloatField(default=0.0)),
                ('correct', models.IntegerField(default=0)),
                ('incorrect', models.IntegerField(default=0)),
                ('unattempted', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='UserTestResult',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('marksObtained', models.FloatField(default=0.0)),
                ('correct', models.IntegerField(default=0)),
                ('unattempted', models.IntegerField(default=0)),
                ('incorrect', models.IntegerField(default=0)),
            ],
        ),
        migrations.RenameField(
            model_name='question',
            old_name='text',
            new_name='questionText',
        ),
        migrations.RemoveField(
            model_name='option',
            name='text',
        ),
        migrations.RemoveField(
            model_name='student',
            name='email',
        ),
        migrations.RemoveField(
            model_name='student',
            name='super_admin',
        ),
        migrations.RemoveField(
            model_name='test',
            name='course',
        ),
        migrations.RemoveField(
            model_name='test',
            name='super_admin',
        ),
        migrations.AddField(
            model_name='option',
            name='optionText',
            field=models.TextField(default='dummy text'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='question',
            name='intAnswer',
            field=models.IntegerField(blank=True, null=True, validators=[django.core.validators.MaxValueValidator(9), django.core.validators.MinValueValidator(0)]),
        ),
        migrations.AddField(
            model_name='question',
            name='passage',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='question',
            name='questionType',
            field=models.CharField(choices=[('mcq', 'mcq'), ('scq', 'scq'), ('integer', 'integer'), ('passage', 'passage')], default='mcq', max_length=10),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='section',
            name='totalMarks',
            field=models.FloatField(blank=True, default=0.0),
        ),
        migrations.AddField(
            model_name='section',
            name='totalQuestions',
            field=models.IntegerField(blank=True, default=0),
        ),
        migrations.AddField(
            model_name='student',
            name='address',
            field=models.CharField(max_length=100, null=True),
        ),
        migrations.AddField(
            model_name='student',
            name='city',
            field=models.CharField(max_length=100, null=True),
        ),
        migrations.AddField(
            model_name='student',
            name='dateOfBirth',
            field=models.DateField(null=True),
        ),
        migrations.AddField(
            model_name='student',
            name='gender',
            field=models.CharField(choices=[('male', 'male'), ('female', 'female')], default='male', max_length=7),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='student',
            name='pinCode',
            field=models.BigIntegerField(null=True),
        ),
        migrations.AddField(
            model_name='student',
            name='state',
            field=models.CharField(max_length=100, null=True),
        ),
        migrations.AddField(
            model_name='test',
            name='instructions',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='test',
            name='startTime',
            field=models.DateTimeField(default=datetime.datetime(2018, 12, 21, 11, 20, 20, 776556, tzinfo=utc)),
        ),
        migrations.AddField(
            model_name='test',
            name='totalMarks',
            field=models.FloatField(blank=True, default=0.0),
        ),
        migrations.AddField(
            model_name='test',
            name='totalQuestions',
            field=models.IntegerField(blank=True, default=0),
        ),
        migrations.AlterField(
            model_name='centre',
            name='location',
            field=models.CharField(max_length=200),
        ),
        migrations.AlterField(
            model_name='staff',
            name='centre',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Centre'),
        ),
        migrations.RemoveField(
            model_name='staff',
            name='course',
        ),
        migrations.AddField(
            model_name='staff',
            name='course',
            field=models.ManyToManyField(blank=True, null=True, to='api.Course'),
        ),
        migrations.AlterField(
            model_name='staff',
            name='super_admin',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='api.SuperAdmin'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='staff',
            name='user',
            field=models.OneToOneField(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='student',
            name='centre',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='api.Centre'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='student',
            name='contact_number',
            field=models.BigIntegerField(null=True),
        ),
        migrations.RemoveField(
            model_name='student',
            name='course',
        ),
        migrations.AddField(
            model_name='student',
            name='course',
            field=models.ManyToManyField(to='api.Course'),
        ),
        migrations.AlterField(
            model_name='superadmin',
            name='institution_name',
            field=models.CharField(max_length=200, null=True),
        ),
        migrations.AlterField(
            model_name='test',
            name='description',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='test',
            name='duration',
            field=models.DurationField(default=datetime.timedelta(0, 10800)),
        ),
        migrations.AlterField(
            model_name='test',
            name='title',
            field=models.CharField(max_length=100),
        ),
        migrations.AddField(
            model_name='usertestresult',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Student'),
        ),
        migrations.AddField(
            model_name='usertestresult',
            name='test',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Test'),
        ),
        migrations.AddField(
            model_name='usersectionwiseresult',
            name='section',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Section'),
        ),
        migrations.AddField(
            model_name='usersectionwiseresult',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Student'),
        ),
        migrations.AddField(
            model_name='userquestionwiseresponse',
            name='question',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Question'),
        ),
        migrations.AddField(
            model_name='userquestionwiseresponse',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Student'),
        ),
        migrations.AddField(
            model_name='userquestionwiseresponse',
            name='userChoices',
            field=models.ManyToManyField(to='api.Option'),
        ),
        migrations.AddField(
            model_name='subject',
            name='super_admin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.SuperAdmin'),
        ),
        migrations.AddField(
            model_name='category',
            name='super_admin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.SuperAdmin'),
        ),
        migrations.AddField(
            model_name='test',
            name='category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Category'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='test',
            name='subject',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Subject'),
        ),
        migrations.AddField(
            model_name='test',
            name='unit',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Unit'),
        ),
    ]
