# Generated by Django 3.0.1 on 2020-01-17 08:35

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('CadetApp', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Meeting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('term', models.IntegerField(choices=[(1, 'Term 1'), (2, 'Term 2'), (3, 'Term 3'), (4, 'Term 4')])),
                ('date', models.DateField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uniform', models.BooleanField()),
                ('cadet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CadetApp.Cadet')),
                ('meeting', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='RollMarkingApp.Meeting')),
            ],
            options={
                'unique_together': {('meeting', 'cadet')},
            },
        ),
        migrations.CreateModel(
            name='Absence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reason_code', models.CharField(choices=[('u', 'Unexplained'), ('e', 'Exams'), ('r', 'Religious Leave'), ('o', 'Other')], default='o', max_length=1)),
                ('cadet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CadetApp.Cadet')),
                ('meeting', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='RollMarkingApp.Meeting')),
            ],
            options={
                'unique_together': {('meeting', 'cadet')},
            },
        ),
    ]
