# Generated by Django 3.0.5 on 2021-02-24 20:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Episode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Наименование эпизода')),
                ('video_url', models.URLField(verbose_name='Ссылка на видео')),
            ],
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Наименование жанра')),
                ('slug', models.SlugField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Anime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='Наименование')),
                ('slug', models.SlugField(unique=True)),
                ('description', models.TextField(verbose_name='Описание')),
                ('image_url', models.URLField(verbose_name='Ссылка на картинку')),
                ('year', models.DateField(verbose_name='Год')),
                ('season', models.CharField(choices=[('WN', 'Зима'), ('SP', 'Весна'), ('SM', 'Лето'), ('AT', 'Осень')], max_length=10)),
                ('age_raiting', models.CharField(choices=[('G', 'G'), ('PG', 'PG'), ('PG-13', 'PG-13'), ('R', 'R'), ('NC-17', 'NC-17')], max_length=30)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainapp.Author', verbose_name='Автор')),
                ('episodes', models.ManyToManyField(to='mainapp.Episode', verbose_name='Эпизоды')),
                ('genres', models.ManyToManyField(to='mainapp.Genre', verbose_name='Жанры')),
            ],
        ),
    ]
