# Generated by Django 3.0.11 on 2021-02-15 21:24

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields


class Migration(migrations.Migration):

    dependencies = [
        ('courses', '0035_invalid_slugs'),
        ('classrooms', '0002_timeslot_course_group_blank'),
    ]

    operations = [
        migrations.CreateModel(
            name='StudentSlot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('is_attended', models.BooleanField(default=True, verbose_name='присутствие')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='classroom_timeslots', to='courses.CourseStudent', verbose_name='студент')),
                ('timeslot', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='students', to='classrooms.Timeslot', verbose_name='слот')),
            ],
            options={
                'verbose_name': 'запись на слот',
                'verbose_name_plural': 'запись на слоты',
                'ordering': ('timeslot', 'student', '-created'),
                'unique_together': {('timeslot', 'student')},
            },
        ),
    ]
