# Generated by Django 2.1.7 on 2019-03-03 10:24

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


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0002_auto_20190302_1649'),
    ]

    operations = [
        migrations.CreateModel(
            name='Content',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name': 'Контент',
                'verbose_name_plural': 'Контент',
            },
        ),
        migrations.CreateModel(
            name='Evaluation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True, verbose_name='Название')),
                ('description', models.TextField(verbose_name='Описание')),
                ('function', models.TextField(verbose_name='Функция')),
            ],
            options={
                'verbose_name': 'Оценивание',
                'verbose_name_plural': 'Оценивания',
            },
        ),
        migrations.CreateModel(
            name='Interest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=300, unique=True, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Интерес/Пожелание',
                'verbose_name_plural': 'Интересы/Пожелания',
            },
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True, verbose_name='Название')),
                ('description', models.TextField(verbose_name='Описание')),
                ('child_modules', models.ManyToManyField(blank=True, related_name='_module_child_modules_+', to='app.Module', verbose_name='Следующие модули')),
            ],
            options={
                'verbose_name': 'Модуль',
                'verbose_name_plural': 'Модули',
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, unique=True, verbose_name='Название роли')),
            ],
            options={
                'verbose_name': 'Роль/Позииция',
                'verbose_name_plural': 'Роли',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, unique=True, verbose_name='ФИО')),
            ],
            options={
                'verbose_name': 'Студент',
                'verbose_name_plural': 'Студенты',
            },
        ),
        migrations.CreateModel(
            name='StudentCompetence',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('level', models.DecimalField(decimal_places=2, max_digits=20, verbose_name='Уровень')),
            ],
            options={
                'verbose_name': 'Студент-Компетенция',
                'verbose_name_plural': 'Студент-Компетенция',
            },
        ),
        migrations.AlterModelOptions(
            name='competence',
            options={'verbose_name': 'Компетенция', 'verbose_name_plural': 'Компетенции'},
        ),
        migrations.AlterField(
            model_name='competence',
            name='name',
            field=models.CharField(max_length=300, unique=True, verbose_name='Название'),
        ),
        migrations.AddField(
            model_name='studentcompetence',
            name='competence',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Competence'),
        ),
        migrations.AddField(
            model_name='studentcompetence',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.Student'),
        ),
        migrations.AddField(
            model_name='student',
            name='competences',
            field=models.ManyToManyField(through='app.StudentCompetence', to='app.Competence', verbose_name='Компетенции'),
        ),
        migrations.AddField(
            model_name='student',
            name='current_module',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='current_modules', to='app.Module', verbose_name='Текущий модуль'),
        ),
        migrations.AddField(
            model_name='student',
            name='interests',
            field=models.ManyToManyField(blank=True, related_name='interests', to='app.Role', verbose_name='Интересы'),
        ),
        migrations.AddField(
            model_name='student',
            name='role',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='current_role', to='app.Role', verbose_name='Роль/Позиция'),
        ),
        migrations.AddField(
            model_name='role',
            name='competences',
            field=models.ManyToManyField(blank=True, related_name='competences', to='app.Competence', verbose_name='Компетенции'),
        ),
        migrations.AddField(
            model_name='module',
            name='competences',
            field=models.ManyToManyField(blank=True, related_name='developed_competences', to='app.Competence', verbose_name='Компетенции'),
        ),
        migrations.AddField(
            model_name='module',
            name='parent_modules',
            field=models.ManyToManyField(blank=True, related_name='_module_parent_modules_+', to='app.Module', verbose_name='Предыдущие модули'),
        ),
        migrations.AddField(
            model_name='evaluation',
            name='competence',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='evaluated_competence', to='app.Competence', verbose_name='Оцениваемая компетенция'),
        ),
    ]
