# Generated by Django 3.1.4 on 2020-12-14 06:30

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Наименование')),
                ('class_schedule', models.FileField(blank=True, null=True, upload_to='files/%Y/%m/%d', verbose_name='Расписание занятий')),
                ('session_schedule', models.FileField(blank=True, null=True, upload_to='files/%Y/%m/%d', verbose_name='Расписание сессии')),
            ],
            options={
                'verbose_name': 'Кафедра',
                'verbose_name_plural': 'Кафедры',
            },
        ),
        migrations.CreateModel(
            name='Discipline',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Наименование')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Описание')),
                ('tutorial', models.FileField(blank=True, null=True, upload_to='files/%Y/%m/%d', verbose_name='Учебник')),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='disciplines', to='core.department', verbose_name='Кафедра')),
            ],
            options={
                'verbose_name': 'Дисциплина',
                'verbose_name_plural': 'Дисциплины',
            },
        ),
        migrations.CreateModel(
            name='UserGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Наименование')),
            ],
            options={
                'verbose_name': 'Группа',
                'verbose_name_plural': 'Группы',
            },
        ),
        migrations.AlterModelOptions(
            name='userprofile',
            options={'verbose_name': 'Профиль пользователя', 'verbose_name_plural': 'Профили пользователей'},
        ),
        migrations.RemoveField(
            model_name='userprofile',
            name='age',
        ),
        migrations.AddField(
            model_name='userprofile',
            name='first_name',
            field=models.CharField(default='asdfasd', max_length=255, verbose_name='Имя'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='userprofile',
            name='last_name',
            field=models.CharField(default='sdfasdfs', max_length=255, verbose_name='Фамилия'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='userprofile',
            name='patronymic',
            field=models.CharField(default='asdfasd', max_length=255, verbose_name='Отчество'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='userprofile',
            name='type',
            field=models.SmallIntegerField(choices=[(0, 'Студент'), (1, 'Преподаватель')], default=0, verbose_name='Тип'),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='Lecture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Наименование')),
                ('created_at', models.DateField(default=django.utils.timezone.now, verbose_name='Дата создания')),
                ('file', models.FileField(upload_to='files/%Y/%m/%d', verbose_name='Файл')),
                ('discipline', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lectures', to='core.discipline', verbose_name='Дисциплина')),
            ],
            options={
                'verbose_name': 'Материал лекции',
                'verbose_name_plural': 'Материалы лекций',
            },
        ),
        migrations.AddField(
            model_name='userprofile',
            name='department',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='user_profiles', to='core.department', verbose_name='Кафедра'),
        ),
        migrations.AddField(
            model_name='userprofile',
            name='user_group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='user_profiles', to='core.usergroup', verbose_name='Группа'),
        ),
    ]
