# Generated by Django 2.2 on 2019-06-07 22:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Actor',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
                ('age', models.IntegerField()),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Director',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
                ('age', models.IntegerField()),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50)),
                ('poster', models.ImageField(default=None, upload_to='')),
                ('duration_q', models.IntegerField()),
                ('detail', models.TextField(default=None)),
                ('trailer_url', models.URLField(default=None)),
                ('gender', models.CharField(blank=True, choices=[(1, 'Accion'), (2, 'Romantic'), (3, 'Scient Ficcion'), (4, 'Humor')], max_length=1)),
                ('lenguage', models.CharField(max_length=50)),
                ('date', models.DateField(default=None)),
                ('country', models.CharField(default=None, max_length=30)),
                ('actor', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='appmovie.Actor')),
                ('director', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='appmovie.Director')),
            ],
            options={
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='MovieRaiting',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('comment', models.TextField(default=None, max_length=400)),
                ('vote', models.CharField(blank=True, choices=[(1, 'I Like'), (2, 'I Dont Like')], default=None, max_length=1)),
                ('id_movie_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='appmovie.Movie')),
                ('id_user_django', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['comment'],
            },
        ),
    ]
