# Generated by Django 3.0.3 on 2020-02-24 19:12

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Название')),
                ('description', models.TextField(max_length=3000, verbose_name='Описание')),
                ('category', models.CharField(choices=[('Ужасы', 'Ужасы'), ('Комедия', 'Комедия'), ('Боевик', 'Боевик'), ('Драма', 'Драма'), ('Детектив', 'Детектив'), ('Фентези', 'Фентези')], max_length=120, verbose_name='Категория')),
                ('poster', models.ImageField(upload_to='image', verbose_name='Постер')),
                ('year', models.PositiveIntegerField(default=2020, verbose_name='Дата выхода')),
                ('url', models.SlugField(max_length=130, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='MovieRoom',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room_name', models.CharField(max_length=120)),
                ('room_size', models.PositiveIntegerField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Session',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start', models.DateTimeField(verbose_name='Когда начинаем сеанс')),
                ('end', models.DateTimeField(verbose_name='Окончание сеанса')),
                ('price', models.PositiveIntegerField(verbose_name='Цена')),
                ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movie.Movie')),
                ('room_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movie.MovieRoom', verbose_name='Название зала')),
            ],
        ),
        migrations.CreateModel(
            name='Images',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, upload_to='review/')),
                ('movie', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='movie.Movie', verbose_name='Фильм')),
            ],
        ),
    ]
