# Generated by Django 6.0 on 2026-03-04 23:59

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(default=django.utils.timezone.now, verbose_name='Date')),
                ('status', models.CharField(choices=[('present', 'Present'), ('absent', 'Absent'), ('late', 'Late'), ('excused', 'Excused Absence'), ('sick', 'Sick'), ('holiday', 'Holiday')], default='present', max_length=20)),
                ('period', models.CharField(choices=[('morning', 'Morning'), ('afternoon', 'Afternoon'), ('full_day', 'Full Day')], default='full_day', max_length=10)),
                ('remarks', models.CharField(blank=True, max_length=200)),
                ('device_id', models.CharField(blank=True, max_length=255)),
                ('synced', models.BooleanField(default=False)),
                ('synced_at', models.DateTimeField(blank=True, default=None, null=True)),
            ],
            options={
                'ordering': ['-date', 'student__first_name'],
            },
        ),
        migrations.CreateModel(
            name='ClassSubject',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hours_per_week', models.PositiveIntegerField(default=2)),
            ],
            options={
                'verbose_name': 'Class Subject',
                'verbose_name_plural': 'Class Subjects',
            },
        ),
        migrations.CreateModel(
            name='SchoolClass',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(help_text='e.g., CL6-A, CE1-B', max_length=20, unique=True)),
                ('name', models.CharField(blank=True, help_text='Display name', max_length=50)),
                ('level', models.CharField(choices=[('pre_nursery', 'Pre-Nursery'), ('nursery1', 'Nursery 1'), ('nursery2', 'Nursery 2'), ('moyenne_section', 'Moyenne Section'), ('grande_section', 'Grande Section'), ('sil', 'SIL'), ('cp', 'CP'), ('ce1', 'CE1'), ('ce2', 'CE2'), ('cm1', 'CM1'), ('cm2', 'CM2'), ('class1', 'Class 1'), ('class2', 'Class 2'), ('class3', 'Class 3'), ('class4', 'Class 4'), ('class5', 'Class 5'), ('class6', 'Class 6')], max_length=20)),
                ('section', models.CharField(blank=True, help_text='A, B, C, etc.', max_length=10)),
                ('section_type', models.CharField(choices=[('english', 'English Section'), ('french', 'French Section'), ('bilingual', 'Bilingual Section')], default='english', max_length=20)),
                ('capacity', models.PositiveIntegerField(default=40)),
                ('room_number', models.CharField(blank=True, max_length=10)),
                ('academic_year', models.CharField(default='2025-2026', max_length=9)),
            ],
            options={
                'verbose_name': 'Class',
                'verbose_name_plural': 'Classes',
                'ordering': ['level', 'section'],
            },
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=10, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('name_fr', models.CharField(blank=True, max_length=100)),
                ('category', models.CharField(choices=[('core', 'Core Subjects'), ('languages', 'Languages'), ('sciences', 'Sciences'), ('humanities', 'Humanities'), ('vocational', 'Vocational Studies'), ('arts', 'Arts'), ('sports', 'Physical Education')], default='core', max_length=20)),
                ('description', models.TextField(blank=True)),
            ],
            options={
                'ordering': ['category', 'name'],
            },
        ),
    ]
