# Generated by Django 5.2.17 on 2026-10-31 12:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('exams', '0132_globalstudyconfig_exam_batch_size_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ConceptScaffold',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('roman_urdu_intro', models.TextField(help_text='e.g., Metabolism kya hai? Yeh anabolism aur catabolism ka sum hai.')),
                ('vocabulary_bridge', models.JSONField(blank=True, default=dict, help_text='Map English term -> Roman Urdu equivalent.')),
                ('socratic_hints_ur', models.JSONField(blank=True, default=list, help_text='Ordered list of Roman Urdu hints for progressive disclosure.')),
                ('is_approved', models.BooleanField(default=False, help_text='Teacher must approve before students see it.')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('kc', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='scaffold', to='exams.knowledgecomponent')),
            ],
            options={
                'verbose_name': 'Concept Scaffold (Roman Urdu)',
                'verbose_name_plural': 'Concept Scaffolds (Roman Urdu)',
            },
        ),
        migrations.CreateModel(
            name='QuestionBlueprint',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stage', models.CharField(choices=[('SELECT', 'Select'), ('STUDY', 'Study'), ('ATTEMPT', 'Attempt'), ('REMEDIATION', 'Remediation'), ('VERIFY', 'Verify'), ('SAFAR', 'Safar')], max_length=20)),
                ('question_type', models.CharField(choices=[('MCQ', 'Multiple Choice'), ('FILL_BLANK', 'Fill in the Blank'), ('MATCHING', 'Matching'), ('REORDER', 'Reorder Sentences'), ('STORY_COMP', 'Story Comprehension')], max_length=20)),
                ('difficulty_tier', models.PositiveSmallIntegerField(choices=[(1, 'Basic'), (2, 'Standard'), (3, 'Advanced')], default=2)),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('kc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blueprints', to='exams.knowledgecomponent')),
            ],
            options={
                'ordering': ['kc_id', 'stage', 'difficulty_tier'],
                'indexes': [models.Index(fields=['kc', 'stage'], name='workshop_qu_kc_id_50ac0f_idx'), models.Index(fields=['stage', 'question_type'], name='workshop_qu_stage_e59155_idx')],
                'unique_together': {('kc', 'stage', 'question_type', 'difficulty_tier')},
            },
        ),
        migrations.CreateModel(
            name='SystemImprovementTask',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(help_text='Student comment, requested question type, or AI-generated content.')),
                ('status', models.CharField(choices=[('PENDING', 'Pending Review'), ('APPROVED', 'Approved & Implemented'), ('REJECTED', 'Rejected')], db_index=True, default='PENDING', max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('review_notes', models.TextField(blank=True)),
                ('reviewed_at', models.DateTimeField(blank=True, null=True)),
                ('kc', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='improvement_tasks', to='exams.knowledgecomponent')),
                ('reviewed_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='reviewed_tasks', to=settings.AUTH_USER_MODEL)),
                ('student', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='improvement_suggestions', to='exams.student')),
            ],
            options={
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['status', '-created_at'], name='workshop_sy_status_b601de_idx'), models.Index(fields=['student', '-created_at'], name='workshop_sy_student_26457e_idx')],
            },
        ),
    ]
