# Generated by Django 2.2.4 on 2019-08-20 12:58

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
            ],
            options={
                'verbose_name': 'País',
                'verbose_name_plural': 'Paises',
                'ordering': ['name'],
                'unique_together': {('name',)},
            },
        ),
        migrations.CreateModel(
            name='Gender',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
            ],
            options={
                'verbose_name': 'Género',
                'verbose_name_plural': 'Generos',
                'ordering': ['name'],
                'unique_together': {('name',)},
            },
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=500, verbose_name='Nombre')),
                ('date_born', models.DateField(blank=True, null=True, verbose_name='Fecha de nacimiento')),
                ('is_actor', models.BooleanField(default=False, verbose_name='Es Actor')),
                ('is_director', models.BooleanField(default=False, verbose_name='Es Director')),
                ('photo', models.ImageField(blank=True, null=True, upload_to='%Y/%m/%d/', verbose_name='Fotografía')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='country', to='main.Country')),
            ],
            options={
                'verbose_name': 'Persona',
                'verbose_name_plural': 'Personas',
                'ordering': ['name'],
                'unique_together': {('name',)},
            },
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=1000, verbose_name='Nombre')),
                ('original_name', models.CharField(blank=True, default='', max_length=1000, verbose_name='Nombre original')),
                ('file_name', models.CharField(blank=True, default='', max_length=1000, verbose_name='Nombre archivo')),
                ('year', models.PositiveSmallIntegerField(default=1900, verbose_name='Año')),
                ('duration', models.PositiveSmallIntegerField(default=0, verbose_name='Duración')),
                ('cartel', models.ImageField(blank=True, null=True, upload_to='%Y/%m/%d/', verbose_name='Cartel')),
                ('count', models.PositiveIntegerField(default=0, verbose_name='Descargas')),
                ('stars', models.PositiveSmallIntegerField(default=0, verbose_name='Estrellas')),
                ('actors', models.ManyToManyField(blank=True, related_name='actors', to='main.Person', verbose_name='Reparto')),
                ('countries', models.ManyToManyField(blank=True, related_name='countries', to='main.Country', verbose_name='País')),
                ('directors', models.ManyToManyField(related_name='directors', to='main.Person', verbose_name='Director')),
                ('genders', models.ManyToManyField(blank=True, related_name='genders', to='main.Gender', verbose_name='Género')),
            ],
            options={
                'verbose_name': 'Película',
                'verbose_name_plural': 'Películas',
                'ordering': ['name'],
                'unique_together': {('name', 'original_name')},
            },
        ),
    ]
