# Generated by Django 3.1.1 on 2020-09-29 13:32

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ImportanceComments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='Важность')),
            ],
            options={
                'verbose_name': 'Важность',
                'verbose_name_plural': 'Важности',
            },
        ),
        migrations.CreateModel(
            name='TypeComments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='Тип')),
            ],
            options={
                'verbose_name': 'Тип',
                'verbose_name_plural': 'Типы',
            },
        ),
        migrations.CreateModel(
            name='Homeworks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Предмет')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='Дата выдачи')),
                ('duration', models.DurationField(verbose_name='Период выполнения')),
                ('text', models.TextField(verbose_name='Текст задания')),
                ('fines', models.CharField(max_length=100, verbose_name='Информация о штрафах')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Домашнее задание',
                'verbose_name_plural': 'Домашние задания',
            },
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(verbose_name='Комментарий')),
                ('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Дата добавления')),
                ('moderation', models.BooleanField(default=False, verbose_name='Модерация')),
                ('homework', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homework.homeworks', verbose_name='Домашнее задание')),
                ('importance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homework.importancecomments', verbose_name='Важность комментария')),
                ('type', models.ManyToManyField(to='homework.TypeComments', verbose_name='Тип комментария')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Комментарий',
                'verbose_name_plural': 'Комментарии',
            },
        ),
    ]
