# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-25 11:43
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contingent', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(0, '\u041f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b'), (1, '\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b'), (2, '\u0423\u0432\u0430\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430'), (3, '\u041d\u0435 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e')], default=3, verbose_name='\u0421\u0442\u0430\u0442\u0443\u0441')),
            ],
            options={
                'ordering': ['clazz__date', 'clazz__couple__time_from'],
            },
        ),
        migrations.CreateModel(
            name='Class',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(verbose_name='\u0414\u0430\u0442\u0430')),
                ('status', models.IntegerField(choices=[(0, '\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u043e\u0441\u044c'), (1, '\u041d\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u043e\u0441\u044c'), (2, '\u041e\u0442\u043c\u0435\u043d\u0435\u043d\u043e'), (3, '\u041d\u0435 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e')], default=3, verbose_name='\u0421\u0442\u0430\u0442\u0443\u0441')),
            ],
            options={
                'ordering': ['date', 'couple__time_from'],
            },
        ),
        migrations.CreateModel(
            name='Couple',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435')),
                ('short_name', models.TextField(blank=True, verbose_name='\u0421\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435')),
                ('time_from', models.TimeField(verbose_name='\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430')),
                ('time_to', models.TimeField(verbose_name='\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f')),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435')),
            ],
        ),
        migrations.CreateModel(
            name='CourseProgramm',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(verbose_name='\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435')),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='programm',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='training.CourseProgramm', verbose_name='\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043a\u0443\u0440\u0441\u0430'),
        ),
        migrations.AddField(
            model_name='course',
            name='students',
            field=models.ManyToManyField(related_name='courses', to='contingent.Student', verbose_name='\u0421\u0442\u0443\u0434\u0435\u043d\u0442\u044b'),
        ),
        migrations.AddField(
            model_name='course',
            name='teachers',
            field=models.ManyToManyField(related_name='courses_teacher', to=settings.AUTH_USER_MODEL, verbose_name='\u0423\u0447\u0438\u0442\u0435\u043b\u044f'),
        ),
        migrations.AddField(
            model_name='class',
            name='couple',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='training.Couple', verbose_name='\u041f\u0430\u0440\u0430'),
        ),
        migrations.AddField(
            model_name='class',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='classes', to='training.Course', verbose_name='\u041a\u0443\u0440\u0441'),
        ),
        migrations.AddField(
            model_name='attendance',
            name='clazz',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attendances', to='training.Class', verbose_name='\u0417\u0430\u043d\u044f\u0442\u0438\u0435'),
        ),
        migrations.AddField(
            model_name='attendance',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attendances', to='contingent.Student', verbose_name='\u0421\u0442\u0443\u0434\u0435\u043d\u0442'),
        ),
    ]
