# Generated by Django 5.2.17 on 2026-10-02 14:18

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


class Migration(migrations.Migration):

    dependencies = [
        ('exams', '0009_correctionlog'),
    ]

    operations = [
        migrations.CreateModel(
            name='ModelPaper',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(db_index=True, max_length=30, unique=True)),
                ('subject', models.CharField(db_index=True, max_length=50)),
                ('medium', models.CharField(choices=[('EN', 'English'), ('UR', 'Urdu / Roman Urdu')], default='EN', max_length=2)),
                ('title', models.CharField(blank=True, max_length=200)),
                ('total_questions', models.PositiveSmallIntegerField(default=0)),
                ('source_note', models.CharField(blank=True, max_length=200)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['subject', 'code'],
            },
        ),
        migrations.CreateModel(
            name='ModelQuestion',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question_index', models.PositiveSmallIntegerField()),
                ('question_text', models.TextField()),
                ('model_answer', models.TextField()),
                ('chapter', models.CharField(blank=True, db_index=True, max_length=200)),
                ('marks', models.PositiveSmallIntegerField(default=5)),
                ('kc_code', models.CharField(blank=True, db_index=True, max_length=30)),
                ('newman_focus', models.CharField(blank=True, max_length=20)),
                ('reasoning_chain', models.JSONField(blank=True, default=list)),
                ('socratic_ladder', models.JSONField(blank=True, default=list)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('paper', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='questions', to='exams.modelpaper')),
            ],
            options={
                'ordering': ['paper', 'question_index'],
                'unique_together': {('paper', 'question_index')},
            },
        ),
    ]
