# Generated by Django 2.2.15 on 2020-12-16 07:23

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


class Migration(migrations.Migration):

    dependencies = [
        ('moduletypes', '0001_initial'),
        ('courses', '0032_set_enable_groups'),
    ]

    operations = [
        migrations.CreateModel(
            name='CourseModule',
            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')),
                ('order', models.PositiveIntegerField(db_index=True, editable=False, verbose_name='order')),
                ('name', models.CharField(max_length=255, verbose_name='название')),
                ('description', models.TextField(blank=True, verbose_name='описание')),
                ('is_active', models.BooleanField(default=True, verbose_name='активен')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='modules', to='courses.Course', verbose_name='курс')),
                ('module_type', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, related_name='modules', to='moduletypes.ModuleType', verbose_name='тип модуля')),
            ],
            options={
                'verbose_name': 'модуль курса',
                'verbose_name_plural': 'модули курсов',
                'ordering': ('order',),
            },
        ),
    ]
