# Generated by Django 5.2.17 on 2026-10-04 15:37

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('exams', '0015_alter_parentreport_week_number'),
    ]

    operations = [
        migrations.CreateModel(
            name='KnowledgeComponent',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(db_index=True, help_text='Stable KC identifier. Must match ModelQuestion.kc_code.', max_length=30, unique=True)),
                ('subject', models.CharField(db_index=True, max_length=50)),
                ('chapter', models.CharField(blank=True, db_index=True, max_length=200)),
                ('title', models.CharField(help_text='Short human-readable name of the concept.', max_length=200)),
                ('description', models.TextField(blank=True, help_text='What the KC is, in plain language (Roman Urdu).')),
                ('cognitive_level', models.CharField(blank=True, choices=[('REM', 'Remember'), ('UND', 'Understand'), ('APP', 'Apply'), ('ANA', 'Analyze'), ('EVA', 'Evaluate'), ('CRE', 'Create')], help_text="Bloom's revised taxonomy level this KC targets.", max_length=3)),
                ('misconceptions', models.JSONField(blank=True, default=list, help_text='Three-AI pipeline output. Each entry is a dict; see the class docstring for the exact keys.')),
                ('socratic_ladder', models.JSONField(blank=True, default=list, help_text='Ordered Socratic prompts (Polya; Sweller). Each entry is a dict; see the class docstring.')),
                ('ready_for_diagnosis', models.BooleanField(db_index=True, default=False, help_text='Gate G6. True only after all entries are approved at G5.')),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['subject', 'code'],
                'indexes': [models.Index(fields=['subject', 'chapter'], name='exams_knowl_subject_8dd214_idx')],
            },
        ),
    ]
