# Generated by Django 3.0.2 on 2020-08-25 07:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('slug', django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from=['name'])),
            ],
        ),
        migrations.CreateModel(
            name='Film',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, default='', max_length=100, null=True)),
                ('year', models.IntegerField(blank=True, null=True)),
                ('description', models.TextField()),
                ('views', models.IntegerField(default=0)),
                ('status', models.CharField(choices=[('HT', 'Hoàn thành'), ('DC', 'Đang sub'), ('DR', 'Drop')], max_length=2)),
                ('poster_url', models.CharField(blank=True, max_length=255, null=True)),
                ('banner_url', models.CharField(blank=True, max_length=255, null=True)),
                ('created_by', models.CharField(blank=True, max_length=100, null=True)),
                ('imdb', models.FloatField(default=0)),
                ('publish_date', models.DateField(auto_now=True)),
                ('slug', django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from=['title'])),
                ('category', models.ManyToManyField(to='core.Category')),
            ],
        ),
        migrations.CreateModel(
            name='SerieSeason',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('season_number', models.IntegerField(blank=True, null=True)),
                ('year', models.IntegerField(blank=True, null=True)),
                ('poster_url', models.CharField(blank=True, max_length=255, null=True)),
                ('banner_url', models.CharField(blank=True, max_length=255, null=True)),
                ('status', models.CharField(choices=[('HT', 'Hoàn thành'), ('DC', 'Đang sub'), ('DR', 'Drop')], max_length=2)),
                ('episode_total', models.IntegerField()),
                ('slug', models.SlugField()),
                ('views', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('film_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.Film')),
                ('url_fb', models.CharField(blank=True, max_length=1000, null=True)),
                ('url_gd', models.CharField(blank=True, max_length=1000, null=True)),
                ('trailer', models.CharField(max_length=255)),
            ],
            bases=('core.film',),
        ),
        migrations.CreateModel(
            name='Serie',
            fields=[
                ('film_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.Film')),
            ],
            bases=('core.film',),
        ),
        migrations.CreateModel(
            name='Episode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ep_number', models.IntegerField(blank=True, null=True)),
                ('title', models.CharField(max_length=200)),
                ('publish_date', models.DateField(auto_now=True)),
                ('url_fb', models.CharField(blank=True, max_length=1000, null=True)),
                ('url_gd', models.CharField(blank=True, max_length=1000, null=True)),
                ('views', models.IntegerField(default=0)),
                ('slug', models.SlugField()),
                ('thumbnail_url', models.CharField(max_length=200)),
                ('imdb', models.FloatField(default=0)),
                ('season', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.SerieSeason')),
            ],
        ),
        migrations.AddField(
            model_name='serieseason',
            name='serie',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Serie'),
        ),
    ]
