# Generated by Django 3.1.4 on 2021-01-31 18:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('instructor', '0001_initial'),
        ('assembly', '0001_initial'),
        ('campus', '0001_initial'),
        ('institution', '0001_initial'),
        ('school', '0001_initial'),
        ('scheduler', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AcademicYear',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('type', models.IntegerField(choices=[(0, 'Semester'), (1, 'Trimester')])),
                ('semester', models.IntegerField(choices=[(1, '1st Semester'), (2, '2nd Semester'), (3, '3rd Semester')])),
                ('season', models.CharField(choices=[(None, '(Unknown)'), ('SU', 'Summer/Dry'), ('SP', 'Spring/Rainy'), ('WI', 'Winter'), ('AU', 'Autumn')], max_length=2)),
                ('start_date', models.DateField()),
                ('end_date', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('activity', models.CharField(max_length=25)),
                ('point', models.DecimalField(decimal_places=2, max_digits=100.0)),
                ('academic_year', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.academicyear')),
            ],
        ),
        migrations.CreateModel(
            name='ActivityType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='InstructorCourseSchedule',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('academic_year', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.academicyear')),
                ('classroom', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='campus.classroom')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='school.course')),
                ('instructor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='instructor.instructor')),
                ('schedule', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.schedule')),
            ],
            options={
                'unique_together': {('academic_year', 'course', 'instructor')},
            },
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=25)),
                ('section', models.CharField(max_length=2)),
                ('_Class', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='assembly.class')),
                ('academic_year', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.academicyear')),
            ],
        ),
        migrations.CreateModel(
            name='SectionStudent',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('academic_year', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.academicyear')),
                ('section', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.section')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='school.enroll')),
            ],
            options={
                'unique_together': {('academic_year', 'section', 'student')},
            },
        ),
        migrations.CreateModel(
            name='SectionInstructor',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('instructor_course_schedules', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.instructorcourseschedule')),
                ('section', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.section')),
            ],
        ),
        migrations.CreateModel(
            name='SectionActivity',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.activity')),
                ('section_instruction', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.sectioninstructor')),
            ],
        ),
        migrations.AddField(
            model_name='section',
            name='instructors',
            field=models.ManyToManyField(through='academic.SectionInstructor', to='academic.InstructorCourseSchedule'),
        ),
        migrations.AddField(
            model_name='section',
            name='students',
            field=models.ManyToManyField(through='academic.SectionStudent', to='school.Enroll'),
        ),
        migrations.CreateModel(
            name='GradeSchoolSection',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=25)),
                ('academic_year', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.academicyear')),
                ('enrolls', models.ManyToManyField(to='school.Enroll')),
                ('instructor_course_schedules', models.ManyToManyField(to='academic.InstructorCourseSchedule')),
                ('sponsor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='campus.campusstaff')),
            ],
        ),
        migrations.CreateModel(
            name='ActivityMark',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('marks', models.JSONField()),
                ('section_enrollment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.sectionstudent')),
                ('section_instruction', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='academic.sectioninstructor')),
            ],
        ),
        migrations.CreateModel(
            name='AcademicStatus',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('status', models.CharField(max_length=25)),
                ('levels', models.ManyToManyField(to='institution.ISCEDLevel')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='section',
            unique_together={('academic_year', 'section', '_Class')},
        ),
    ]
