# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-28 02:26
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Episode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('imdb_id', models.CharField(db_index=True, max_length=200, unique=True)),
                ('release_date', models.DateField(blank=True, null=True)),
                ('type', models.CharField(blank=True, max_length=200, null=True)),
                ('year', models.CharField(blank=True, max_length=5, null=True)),
                ('season', models.FloatField()),
                ('episode', models.FloatField()),
                ('title', models.CharField(db_index=True, max_length=200)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ('serial', 'title', 'created_at'),
                'verbose_name': 'Episode',
                'verbose_name_plural': 'Episodes',
            },
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=100, unique=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ('name', 'created_at'),
                'verbose_name': 'Genre',
                'verbose_name_plural': 'Genres',
            },
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('imdb_id', models.CharField(db_index=True, max_length=200, unique=True)),
                ('name', models.CharField(db_index=True, max_length=200)),
                ('photo_url', models.TextField(blank=True, max_length=500, null=True)),
                ('attr', models.TextField(blank=True, max_length=500, null=True)),
                ('job', models.TextField(blank=True, max_length=500, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ('name', 'created_at'),
                'verbose_name': 'Person',
                'verbose_name_plural': 'Person',
            },
        ),
        migrations.CreateModel(
            name='PersonImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.TextField(max_length=500)),
                ('caption', models.TextField(blank=True, max_length=500, null=True)),
                ('width', models.FloatField(blank=True, default=0, null=True)),
                ('height', models.FloatField(blank=True, default=0, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', related_query_name='image', to='core.Person')),
            ],
            options={
                'ordering': ('caption', 'created_at'),
                'verbose_name': 'Person Image',
                'verbose_name_plural': 'Person Images',
            },
        ),
        migrations.CreateModel(
            name='Plot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(max_length=500)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ('title', 'name', 'created_at'),
                'verbose_name': 'Plot',
                'verbose_name_plural': 'Plots',
            },
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(db_index=True, max_length=200)),
                ('text', models.TextField(blank=True, max_length=1000, null=True)),
                ('date', models.DateField(blank=True, null=True)),
                ('rating', models.FloatField()),
                ('summary', models.TextField(blank=True, max_length=200, null=True)),
                ('status', models.CharField(max_length=100)),
                ('user_location', models.CharField(max_length=100)),
                ('user_score', models.FloatField(blank=True, default=0, null=True)),
                ('user_score_count', models.FloatField(blank=True, default=0, null=True)),
                ('title', models.CharField(db_index=True, max_length=200)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ('title', 'rating', 'created_at'),
                'verbose_name': 'Review',
                'verbose_name_plural': 'Reviews',
            },
        ),
        migrations.CreateModel(
            name='Title',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('imdb_id', models.CharField(db_index=True, max_length=50, unique=True)),
                ('name', models.CharField(db_index=True, max_length=200)),
                ('type', models.CharField(max_length=50)),
                ('year', models.CharField(blank=True, max_length=5, null=True)),
                ('tagline', models.TextField(blank=True, max_length=200, null=True)),
                ('plot_outline', models.TextField(blank=True, max_length=200, null=True)),
                ('rating', models.FloatField(blank=True, default=0)),
                ('votes', models.BigIntegerField(blank=True, default=0)),
                ('runtime', models.BigIntegerField(blank=True, default=0)),
                ('poster_url', models.TextField(blank=True, max_length=200, null=True)),
                ('cover_url', models.TextField(blank=True, max_length=200, null=True)),
                ('release_date', models.DateField(blank=True, null=True)),
                ('certification', models.CharField(blank=True, max_length=5, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'ordering': ('name', 'created_at'),
                'verbose_name': 'Title',
                'verbose_name_plural': 'Title',
            },
        ),
        migrations.CreateModel(
            name='TitleImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.TextField(max_length=500)),
                ('caption', models.TextField(blank=True, max_length=500, null=True)),
                ('width', models.FloatField(blank=True, default=0, null=True)),
                ('height', models.FloatField(blank=True, default=0, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('title', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', related_query_name='image', to='core.Title')),
            ],
            options={
                'ordering': ('caption', 'created_at'),
                'verbose_name': 'Title Image',
                'verbose_name_plural': 'Title Images',
            },
        ),
        migrations.CreateModel(
            name='TitlePerson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='works', related_query_name='work', to='core.Person')),
                ('title', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='casts', related_query_name='cast', to='core.Title')),
            ],
            options={
                'ordering': ('title', 'person', 'created_at'),
                'verbose_name': 'Title Person',
                'verbose_name_plural': 'Title Persons',
            },
        ),
        migrations.CreateModel(
            name='Trailer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(max_length=500)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('title', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trailers', related_query_name='trailer', to='core.Title')),
            ],
            options={
                'ordering': ('title', 'name', 'created_at'),
                'verbose_name': 'Trailer',
                'verbose_name_plural': 'Trailers',
            },
        ),
        migrations.CreateModel(
            name='TrailorImageUrl',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(max_length=500)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('title', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trailer_image_urls', related_query_name='trailer_image_url', to='core.Title')),
            ],
            options={
                'ordering': ('title', 'name', 'created_at'),
                'verbose_name': 'Trailor Image Url',
                'verbose_name_plural': 'Trailor Image Urls',
            },
        ),
        migrations.AddField(
            model_name='plot',
            name='title',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='plots', related_query_name='plot', to='core.Title'),
        ),
        migrations.AddField(
            model_name='genre',
            name='title',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='genres', related_query_name='genre', to='core.Title'),
        ),
        migrations.AddField(
            model_name='episode',
            name='serial',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='episodes', related_query_name='episode', to='core.Title'),
        ),
    ]
