# Generated by Django 5.2.17 on 2026-09-22 06:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='QuestionBatch',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_type', models.CharField(choices=[('mcq_single', 'MCQ (Single Correct)'), ('mcq_multi', 'MCQ (Multiple Correct)'), ('true_false', 'True / False'), ('fill_blank', 'Fill in the Blank'), ('short_answer', 'Short Answer'), ('long_answer', 'Long / Descriptive Answer'), ('match_following', 'Match the Following'), ('assertion_reason', 'Assertion & Reason')], max_length=32)),
                ('difficulty', models.CharField(choices=[('easy', 'Easy'), ('medium', 'Medium'), ('hard', 'Hard')], default='medium', max_length=16)),
                ('requested_count', models.PositiveIntegerField(default=5)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('success', 'Success'), ('failed', 'Failed')], default='pending', max_length=16)),
                ('error_message', models.TextField(blank=True)),
                ('raw_response', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_type', models.CharField(choices=[('mcq_single', 'MCQ (Single Correct)'), ('mcq_multi', 'MCQ (Multiple Correct)'), ('true_false', 'True / False'), ('fill_blank', 'Fill in the Blank'), ('short_answer', 'Short Answer'), ('long_answer', 'Long / Descriptive Answer'), ('match_following', 'Match the Following'), ('assertion_reason', 'Assertion & Reason')], max_length=32)),
                ('question_text', models.TextField()),
                ('options', models.JSONField(blank=True, null=True)),
                ('correct_answer', models.JSONField(blank=True, null=True)),
                ('explanation', models.TextField(blank=True)),
                ('difficulty', models.CharField(choices=[('easy', 'Easy'), ('medium', 'Medium'), ('hard', 'Hard')], default='medium', max_length=16)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('batch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='questionbank.questionbatch')),
            ],
        ),
        migrations.AddField(
            model_name='questionbatch',
            name='topic',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='batches', to='questionbank.topic'),
        ),
    ]
