# Generated by Django 3.1.6 on 2021-02-13 11:23

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('movie_genre', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=300)),
                ('image', models.ImageField(upload_to='')),
                ('age', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Movie_Actor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='MovieList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('rate', models.IntegerField()),
                ('image', models.ImageField(upload_to='')),
                ('description', models.TextField()),
                ('release_date', models.DateField()),
                ('trailer_link', models.URLField()),
                ('Actor', models.ManyToManyField(through='movies.Movie_Actor', to='movies.Actor')),
                ('genre', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movie_genre.genre')),
            ],
        ),
        migrations.AddField(
            model_name='movie_actor',
            name='genre',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.movielist'),
        ),
        migrations.AddField(
            model_name='movie_actor',
            name='movie',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.actor'),
        ),
        migrations.AddField(
            model_name='actor',
            name='movie',
            field=models.ManyToManyField(through='movies.Movie_Actor', to='movies.MovieList'),
        ),
    ]
