# Generated by Django 2.2.2 on 2019-06-14 20:10

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Artista',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sobrenome', models.CharField(max_length=50)),
                ('nome', models.CharField(max_length=50)),
                ('nascimento', models.IntegerField(blank=True, null=True, verbose_name='Ano de Nascimento')),
                ('falecimento', models.BooleanField(default=False)),
                ('sexo', models.CharField(choices=[('M', 'Masculino'), ('F', 'Feminino')], max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='AtuouFilme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('protagonista', models.BooleanField(default=False)),
                ('antagonista', models.BooleanField(default=False)),
                ('debute', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='DirigiuFilme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Filme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_filme', models.CharField(max_length=350, verbose_name='Nome do Filme')),
                ('ano_lancamento', models.IntegerField(verbose_name='Lançamento')),
                ('avaliacao', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(10)])),
            ],
        ),
        migrations.CreateModel(
            name='Pais',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_pais', models.CharField(max_length=30, unique=True, verbose_name='Nome do País')),
            ],
        ),
        migrations.CreateModel(
            name='PremioAtuacao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_premio', models.CharField(max_length=350, verbose_name='Nome do Prêmio')),
            ],
        ),
        migrations.CreateModel(
            name='PremioDirecao',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_premio', models.CharField(max_length=350, verbose_name='Nome do Prêmio')),
            ],
        ),
        migrations.CreateModel(
            name='PremioFilme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome_premio', models.CharField(max_length=350, verbose_name='Nome do Prêmio')),
            ],
        ),
        migrations.CreateModel(
            name='Ator',
            fields=[
                ('artista', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='movies.Artista')),
            ],
        ),
        migrations.CreateModel(
            name='Diretor',
            fields=[
                ('artista', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='movies.Artista')),
            ],
        ),
        migrations.CreateModel(
            name='PremioDirecaoFilme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ano_premio', models.IntegerField(verbose_name='Premiação')),
                ('direcao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.DirigiuFilme')),
                ('premio_direcao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.PremioDirecao')),
            ],
        ),
        migrations.CreateModel(
            name='PremioAtuacaoFilme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ano_premio', models.IntegerField(verbose_name='Premiação')),
                ('atauacao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.AtuouFilme')),
                ('premio_atuacao', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.PremioAtuacao')),
            ],
        ),
        migrations.CreateModel(
            name='FilmePremiado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ano_premiacao', models.IntegerField(verbose_name='Premiação')),
                ('filme', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Filme')),
                ('premio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.PremioFilme')),
            ],
        ),
        migrations.AddField(
            model_name='filme',
            name='paises',
            field=models.ManyToManyField(to='movies.Pais'),
        ),
        migrations.AddField(
            model_name='filme',
            name='premio_filme',
            field=models.ManyToManyField(through='movies.FilmePremiado', to='movies.PremioFilme'),
        ),
        migrations.AddField(
            model_name='dirigiufilme',
            name='filme',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Filme'),
        ),
        migrations.AddField(
            model_name='dirigiufilme',
            name='premio',
            field=models.ManyToManyField(through='movies.PremioDirecaoFilme', to='movies.PremioDirecao'),
        ),
        migrations.AddField(
            model_name='atuoufilme',
            name='filme',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Filme'),
        ),
        migrations.AddField(
            model_name='atuoufilme',
            name='premio',
            field=models.ManyToManyField(through='movies.PremioAtuacaoFilme', to='movies.PremioAtuacao'),
        ),
        migrations.AddField(
            model_name='artista',
            name='pais',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Pais'),
        ),
        migrations.AddField(
            model_name='filme',
            name='atores',
            field=models.ManyToManyField(through='movies.AtuouFilme', to='movies.Ator'),
        ),
        migrations.AddField(
            model_name='dirigiufilme',
            name='diretor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Diretor'),
        ),
        migrations.AddField(
            model_name='atuoufilme',
            name='ator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Ator'),
        ),
    ]
