# Generated by Django 3.2 on 2021-05-14 09:50

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='MovieGenre',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('genre_name', models.CharField(max_length=24)),
            ],
        ),
        migrations.CreateModel(
            name='MovieImageThumbnail',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('movie_thumbnail', models.ImageField(default='posts/default.jpg', upload_to=myapi.models.thumbnail_path)),
                ('movie_full_img', models.ImageField(default='posts/default.jpg', upload_to=myapi.models.full_picture_path)),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField(max_length=1000)),
                ('imageurl', models.TextField(blank=True, max_length=1000, null=True)),
                ('number_of_page_visits', models.IntegerField(default=0)),
                ('genre', models.ManyToManyField(related_name='genres', to='myapi.MovieGenre')),
                ('image', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='myapi.movieimagethumbnail')),
            ],
        ),
    ]
