# Generated by Django 2.1 on 2018-10-23 08:02

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0014_auto_20181019_2003'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256, verbose_name='Название проекта')),
                ('description', models.TextField(blank=True, default='', verbose_name='Описание проекта')),
                ('status', models.CharField(choices=[('h', 'Скрыт'), ('p', 'Опубликован')], default='h', max_length=1, verbose_name='Статус публикации')),
                ('_startdate', models.DateTimeField(blank=True, null=True, verbose_name='Начало проекта')),
                ('_enddate', models.DateTimeField(blank=True, null=True, verbose_name='Конец проекта')),
                ('projects', models.ManyToManyField(blank=True, to='core.Project')),
            ],
            options={
                'verbose_name': 'курс',
                'verbose_name_plural': 'курсы',
            },
        ),
        migrations.CreateModel(
            name='CourseUserRegistration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(choices=[('student', 'Студент'), ('staff', 'Преподаватель'), ('admin', 'Администратор')], max_length=8, verbose_name='Тип регистрации')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Course', verbose_name='Курс')),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Person', verbose_name='Персона')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='courseuserregistration',
            unique_together={('person', 'course')},
        ),
    ]
