# Generated by Django 5.1 on 2025-01-17 10:00

import django.db.models.deletion
import django.utils.timezone
import uuid
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Area',
            fields=[
                ('area_SI_Code', models.CharField(default=uuid.uuid4, editable=False, max_length=50, primary_key=True, serialize=False)),
                ('area_Short_Code', models.CharField(max_length=50)),
                ('area_Colour_Hex', models.CharField(default='#FFFFFF', max_length=50)),
                ('area_Serial', models.CharField(max_length=50)),
                ('mppsc_para', models.CharField(default='MPPSC PARA', max_length=255)),
                ('upsc_para', models.CharField(default='UPSC PARA', max_length=255)),
                ('name', models.CharField(max_length=255)),
                ('name_en', models.CharField(max_length=255, null=True)),
                ('name_hi', models.CharField(max_length=255, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ChapterName',
            fields=[
                ('chapter_number', models.CharField(default=uuid.uuid4, editable=False, max_length=50, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('name_en', models.CharField(max_length=255, null=True)),
                ('name_hi', models.CharField(max_length=255, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='PartName',
            fields=[
                ('part_serial', models.CharField(default=uuid.uuid4, editable=False, max_length=50, primary_key=True, serialize=False)),
                ('part_short_code', models.CharField(max_length=255)),
                ('name', models.CharField(max_length=255)),
                ('name_en', models.CharField(max_length=255, null=True)),
                ('name_hi', models.CharField(max_length=255, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='SubTopicName',
            fields=[
                ('sub_topic_SI_Number', models.CharField(default=uuid.uuid4, editable=False, max_length=50, primary_key=True, serialize=False)),
                ('sub_topic_Code_Non_CTPL', models.CharField(max_length=255)),
                ('sub_topic_Code_CTPL', models.CharField(max_length=255)),
                ('name', models.CharField(max_length=255)),
                ('name_en', models.CharField(max_length=255, null=True)),
                ('name_hi', models.CharField(max_length=255, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='InputSuggestion',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language', models.CharField(blank=True, default='', max_length=100, null=True)),
                ('script', models.TextField(blank=True, null=True)),
                ('evergreen_index', models.PositiveIntegerField(blank=True, default=5, null=True)),
                ('brief_description', models.TextField()),
                ('details', models.TextField()),
                ('question_video', models.FileField(blank=True, null=True, upload_to='input_suggestion/videos/')),
                ('question_link', models.URLField(blank=True, max_length=255, null=True)),
                ('other_text', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('area_name', models.ManyToManyField(related_name='input_suggestions', to='question_bank.area')),
                ('chapter_name', models.ManyToManyField(blank=True, related_name='input_suggestions', to='question_bank.chaptername')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('part_name', models.ManyToManyField(related_name='input_suggestions', to='question_bank.partname')),
            ],
        ),
        migrations.CreateModel(
            name='InputSuggestionDocument',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('document', models.FileField(upload_to='input_suggestion/documents/')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='question_bank.inputsuggestion')),
            ],
        ),
        migrations.CreateModel(
            name='InputSuggestionImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='input_suggestion/images/')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='question_bank.inputsuggestion')),
            ],
        ),
        migrations.AddField(
            model_name='chaptername',
            name='part',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chapters', to='question_bank.partname'),
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('report_type', models.CharField(choices=[('this_week', 'This Week Report'), ('earlier', 'Earlier Report')], max_length=20)),
                ('report_date', models.DateTimeField(auto_now_add=True)),
                ('total_questions', models.IntegerField(default=0)),
                ('total_phrases', models.IntegerField(default=0)),
                ('total_suggestions', models.IntegerField(default=0)),
                ('simple_type_count', models.IntegerField(default=0)),
                ('list_1_type_count', models.IntegerField(default=0)),
                ('list_2_type_count', models.IntegerField(default=0)),
                ('ra_type_count', models.IntegerField(default=0)),
                ('true_false_type_count', models.IntegerField(default=0)),
                ('fill_blank_count', models.IntegerField(default=0)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('section_Unit_SI', models.CharField(default=uuid.uuid4, editable=False, max_length=50, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('name_en', models.CharField(max_length=255, null=True)),
                ('name_hi', models.CharField(max_length=255, null=True)),
                ('area', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='section', to='question_bank.area')),
            ],
        ),
        migrations.AddField(
            model_name='partname',
            name='section',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parts', to='question_bank.section'),
        ),
        migrations.AddField(
            model_name='inputsuggestion',
            name='section_name',
            field=models.ManyToManyField(related_name='input_suggestions', to='question_bank.section'),
        ),
        migrations.AddField(
            model_name='inputsuggestion',
            name='subtopic_name',
            field=models.ManyToManyField(blank=True, related_name='input_suggestions', to='question_bank.subtopicname'),
        ),
        migrations.CreateModel(
            name='TopicName',
            fields=[
                ('topic_SI_number', models.CharField(default=uuid.uuid4, editable=False, max_length=50, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('name_en', models.CharField(max_length=255, null=True)),
                ('name_hi', models.CharField(max_length=255, null=True)),
                ('chapter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='topics', to='question_bank.chaptername')),
            ],
        ),
        migrations.AddField(
            model_name='subtopicname',
            name='topic',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sub_topics', to='question_bank.topicname'),
        ),
        migrations.CreateModel(
            name='QuoteIdiomPhrase',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('quote', 'Quote'), ('idiom', 'Idiom'), ('phrase', 'Phrase')], max_length=10)),
                ('content', models.TextField()),
                ('meaning', models.TextField(blank=True, null=True)),
                ('author', models.CharField(blank=True, max_length=255, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('staff_approved', 'Staff Approved'), ('admin_approved', 'Admin Approved'), ('rejected', 'Rejected')], default='pending', max_length=15)),
                ('rejected_reason', models.TextField(blank=True, null=True)),
                ('admin_approved_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='admin_approved_quotes', to=settings.AUTH_USER_MODEL)),
                ('areas', models.ManyToManyField(blank=True, to='question_bank.area')),
                ('chapters', models.ManyToManyField(blank=True, to='question_bank.chaptername')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('parts', models.ManyToManyField(blank=True, to='question_bank.partname')),
                ('staff_approved_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='staff_approved_quotes', to=settings.AUTH_USER_MODEL)),
                ('section', models.ManyToManyField(blank=True, to='question_bank.section')),
                ('topics', models.ManyToManyField(blank=True, to='question_bank.topicname')),
            ],
        ),
        migrations.CreateModel(
            name='QuestionBank',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_of_question', models.CharField(default='mcq1', max_length=100)),
                ('exam_stage', models.CharField(blank=True, max_length=100, null=True)),
                ('exam_year', models.IntegerField(blank=True, null=True)),
                ('language', models.CharField(blank=True, default='', max_length=100, null=True)),
                ('script', models.TextField(blank=True, null=True)),
                ('evergreen_index', models.PositiveIntegerField(blank=True, default=5, null=True)),
                ('marks', models.FloatField(default=0.0)),
                ('negative_marks', models.FloatField(default=0.0)),
                ('degree_of_difficulty', models.CharField(max_length=100)),
                ('question_sub_type', models.CharField(choices=[('simple_type', 'Simple Type'), ('r_and_a_type', 'R & A Type'), ('list_type_1', 'List Type 1'), ('list_type_2', 'List Type 2'), ('true_and_false_type', 'True & False'), ('fill_in_the_blank_type', 'Fill in the Blank')], default='simple_type', max_length=100)),
                ('question_number', models.PositiveIntegerField(blank=True, null=True, unique=True)),
                ('question_part', models.TextField(blank=True, null=True)),
                ('reason', models.TextField(blank=True, null=True)),
                ('assertion', models.TextField(blank=True, null=True)),
                ('question_part_first', models.TextField(blank=True, null=True)),
                ('list_1_name', models.CharField(blank=True, max_length=100, null=True)),
                ('list_2_name', models.CharField(blank=True, max_length=100, null=True)),
                ('list_1_row1', models.CharField(blank=True, max_length=255, null=True)),
                ('list_1_row2', models.CharField(blank=True, max_length=255, null=True)),
                ('list_1_row3', models.CharField(blank=True, max_length=255, null=True)),
                ('list_1_row4', models.CharField(blank=True, max_length=255, null=True)),
                ('list_1_row5', models.CharField(blank=True, max_length=255, null=True)),
                ('list_1_row6', models.CharField(blank=True, max_length=255, null=True)),
                ('list_1_row7', models.CharField(blank=True, max_length=255, null=True)),
                ('list_1_row8', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row1', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row2', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row3', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row4', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row5', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row6', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row7', models.CharField(blank=True, max_length=255, null=True)),
                ('list_2_row8', models.CharField(blank=True, max_length=255, null=True)),
                ('question_part_third', models.TextField(blank=True, null=True)),
                ('answer_option_a', models.TextField(blank=True, null=True)),
                ('answer_option_b', models.TextField(blank=True, null=True)),
                ('answer_option_c', models.TextField(blank=True, null=True)),
                ('answer_option_d', models.TextField(blank=True, null=True)),
                ('correct_answer_choice', models.CharField(blank=True, max_length=255, null=True)),
                ('correct_answer_description', models.TextField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='Question Images')),
                ('table_head_a', models.CharField(blank=True, max_length=100, null=True)),
                ('table_head_b', models.CharField(blank=True, max_length=100, null=True)),
                ('table_head_c', models.CharField(blank=True, max_length=100, null=True)),
                ('table_head_d', models.CharField(blank=True, max_length=100, null=True)),
                ('head_a_data1', models.CharField(blank=True, max_length=100, null=True)),
                ('head_a_data2', models.CharField(blank=True, max_length=100, null=True)),
                ('head_a_data3', models.CharField(blank=True, max_length=100, null=True)),
                ('head_a_data4', models.CharField(blank=True, max_length=100, null=True)),
                ('head_b_data1', models.CharField(blank=True, max_length=100, null=True)),
                ('head_b_data2', models.CharField(blank=True, max_length=100, null=True)),
                ('head_b_data3', models.CharField(blank=True, max_length=100, null=True)),
                ('head_b_data4', models.CharField(blank=True, max_length=100, null=True)),
                ('head_c_data1', models.CharField(blank=True, max_length=100, null=True)),
                ('head_c_data2', models.CharField(blank=True, max_length=100, null=True)),
                ('head_c_data3', models.CharField(blank=True, max_length=100, null=True)),
                ('head_c_data4', models.CharField(blank=True, max_length=100, null=True)),
                ('head_d_data1', models.CharField(blank=True, max_length=100, null=True)),
                ('head_d_data2', models.CharField(blank=True, max_length=100, null=True)),
                ('head_d_data3', models.CharField(blank=True, max_length=100, null=True)),
                ('head_d_data4', models.CharField(blank=True, max_length=100, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('area_name', models.ManyToManyField(related_name='questions', to='question_bank.area')),
                ('chapter_name', models.ManyToManyField(blank=True, related_name='questions', to='question_bank.chaptername')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('part_name', models.ManyToManyField(related_name='questions', to='question_bank.partname')),
                ('section_name', models.ManyToManyField(related_name='questions', to='question_bank.section')),
                ('subtopic_name', models.ManyToManyField(blank=True, related_name='questions', to='question_bank.subtopicname')),
                ('topic_name', models.ManyToManyField(blank=True, related_name='questions', to='question_bank.topicname')),
            ],
        ),
        migrations.AddField(
            model_name='inputsuggestion',
            name='topic_name',
            field=models.ManyToManyField(blank=True, related_name='input_suggestions', to='question_bank.topicname'),
        ),
    ]
