# Generated by Django 5.2.17 on 2026-10-27 11:45

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


class Migration(migrations.Migration):

    dependencies = [
        ('exams', '0115_attemptlog'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='attemptlog',
            name='daily_code',
            field=models.CharField(blank=True, db_index=True, default='', help_text='Daily code entered by student to unlock this attempt.', max_length=30),
        ),
        migrations.AddField(
            model_name='attemptlog',
            name='grading_prompt',
            field=models.TextField(blank=True, default='', help_text='AI prompt used to OCR/grade, for audit.'),
        ),
        migrations.AddField(
            model_name='attemptlog',
            name='grading_rubric',
            field=models.JSONField(blank=True, default=dict, help_text='Rubric used for grading: expected_answer, keywords, max_marks.'),
        ),
        migrations.AddField(
            model_name='attemptlog',
            name='image',
            field=models.ImageField(blank=True, null=True, upload_to='attempts/%Y/%m/'),
        ),
        migrations.AddField(
            model_name='attemptlog',
            name='is_physical',
            field=models.BooleanField(db_index=True, default=False, help_text='True if this attempt came from a physical test upload.'),
        ),
        migrations.AddField(
            model_name='attemptlog',
            name='ocr_text',
            field=models.TextField(blank=True, default='', help_text='Transcribed answer text (from OCR or delegate entry).'),
        ),
        migrations.AddField(
            model_name='attemptlog',
            name='uploaded_by_user',
            field=models.ForeignKey(blank=True, help_text='Delegate who uploaded on behalf of student (teacher-delegated).', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='uploaded_attempts', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='studentnote',
            name='is_contribution',
            field=models.BooleanField(db_index=True, default=False, help_text='True if this note was created by contributing a story heal.'),
        ),
    ]
