# Generated by Codex on 2026-03-11
from django.db import migrations, models
import django.db.models.deletion
import django.core.validators
import schools.models


class Migration(migrations.Migration):

    dependencies = [
        ('schools', '0052_school_pricing_and_limits'),
    ]

    operations = [
        migrations.CreateModel(
            name='LearningResource',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('curriculum', models.CharField(choices=[('CBE', 'CBE'), ('CAMBRIDGE', 'Cambridge')], max_length=20)),
                ('class_name', models.CharField(blank=True, default='', max_length=60)),
                ('subject_name', models.CharField(blank=True, default='', max_length=120)),
                ('resource_type', models.CharField(choices=[('EXAM', 'Exam'), ('NOTES', 'Notes'), ('REVISION', 'Revision'), ('SCHEME', 'Scheme of Work'), ('PAST_PAPER', 'Past Paper'), ('OTHER', 'Other')], default='OTHER', max_length=20)),
                ('title', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, default='')),
                ('file', models.FileField(upload_to='resources/', validators=[django.core.validators.FileExtensionValidator(['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']), schools.models._validate_resource_size])),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('education_level', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='schools.educationlevel')),
            ],
            options={
                'ordering': ['education_level__name', 'class_name', 'subject_name', 'title'],
            },
        ),
    ]
