# Generated by Django 5.2.17 on 2026-10-02 11:06

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


class Migration(migrations.Migration):

    dependencies = [
        ('exams', '0005_storylecture_storyreflection_reflectionscore'),
    ]

    operations = [
        migrations.CreateModel(
            name='StudentProfile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('student', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to='exams.student')),
            ],
            options={
                'ordering': ['student__code'],
            },
        ),
        migrations.CreateModel(
            name='ProfileSummary',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('generated_at', models.DateTimeField(auto_now_add=True)),
                ('entry_count', models.PositiveIntegerField(default=0)),
                ('biological_summary', models.TextField(blank=True)),
                ('psychological_summary', models.TextField(blank=True)),
                ('social_summary', models.TextField(blank=True)),
                ('academic_summary', models.TextField(blank=True)),
                ('action_plan', models.TextField(blank=True)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='summaries', to='exams.studentprofile')),
            ],
            options={
                'ordering': ['-generated_at'],
            },
        ),
        migrations.CreateModel(
            name='ProfileEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('entry_date', models.DateField(db_index=True)),
                ('domain', models.CharField(choices=[('BIO', 'Biological - health, sleep, nutrition, energy'), ('PSY', 'Psychological - emotion, confidence, motivation'), ('SOC', 'Social - family, peers, home support, attendance pattern'), ('ACA', 'Academic - learning, understanding, skill gaps')], db_index=True, max_length=3)),
                ('observed', models.TextField(help_text='What was seen or heard. No interpretation. No adjectives.')),
                ('context', models.TextField(blank=True, help_text='Where, when, with whom.')),
                ('source', models.CharField(choices=[('T', 'Teacher'), ('P', 'Parent'), ('S', 'Student')], default='T', max_length=1)),
                ('confidence', models.PositiveSmallIntegerField(default=3, help_text='1 low - 5 high. How sure are you of this observation?')),
                ('parent_visible', models.BooleanField(default=False)),
                ('shareable_with_student', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='entries', to='exams.studentprofile')),
            ],
            options={
                'ordering': ['-entry_date', '-created_at'],
                'indexes': [models.Index(fields=['profile', 'domain', 'entry_date'], name='exams_profi_profile_8f6d27_idx')],
            },
        ),
    ]
