# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-04-12 08:40
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('cms_test2', '0002_auto_20180412_0837'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('category_id', models.CharField(max_length=80, primary_key=True, serialize=False)),
                ('category_name', models.CharField(max_length=100)),
                ('level', models.PositiveIntegerField()),
                ('father', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='cms_test2.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Channel',
            fields=[
                ('channel_id', models.CharField(max_length=80, primary_key=True, serialize=False)),
                ('channel_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('genre_id', models.CharField(max_length=80, primary_key=True, serialize=False)),
                ('genre_name', models.CharField(max_length=100)),
                ('level', models.PositiveIntegerField()),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cms_test2.Category')),
                ('father', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='cms_test2.Genre')),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('language_id', models.CharField(max_length=80, primary_key=True, serialize=False)),
                ('language_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Publisher',
            fields=[
                ('publisher_id', models.CharField(max_length=80, primary_key=True, serialize=False)),
                ('publisher_name', models.CharField(max_length=100)),
                ('description', models.CharField(blank=True, max_length=1000, null=True)),
                ('poster', models.CharField(blank=True, max_length=300, null=True)),
                ('icon', models.CharField(blank=True, max_length=300, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ShortVideoInfo',
            fields=[
                ('short_video_info_id', models.AutoField(primary_key=True, serialize=False)),
                ('relation_type', models.PositiveIntegerField(blank=True, choices=[(0, 'tv show clip'), (1, 'tv show trailer'), (2, 'movie clip'), (3, 'movie trailer')], null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ShortVideoLangPack',
            fields=[
                ('short_video_lang_pack_id', models.AutoField(primary_key=True, serialize=False)),
                ('is_default', models.PositiveIntegerField(blank=True, choices=[(0, 'not default language'), (1, 'is default language')], null=True)),
                ('title', models.CharField(blank=True, max_length=100, null=True)),
                ('description', models.CharField(blank=True, max_length=1000, null=True)),
                ('language', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cms_test2.Language')),
                ('short_video_info', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cms_test2.ShortVideoInfo')),
            ],
        ),
        migrations.CreateModel(
            name='Thumbnail',
            fields=[
                ('thumbnail_id', models.AutoField(primary_key=True, serialize=False)),
                ('width', models.PositiveIntegerField()),
                ('height', models.PositiveIntegerField()),
                ('url', models.CharField(blank=True, max_length=300, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('video_id', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('duration', models.PositiveIntegerField(blank=True, null=True)),
                ('src_url', models.CharField(blank=True, max_length=300, null=True)),
                ('video_hash', models.CharField(blank=True, max_length=80, null=True)),
                ('is_transcode', models.PositiveIntegerField(choices=[(0, 'not transcode'), (1, 'transcoded without DRM'), (2, 'transcoded with DRM')], default=0)),
                ('release_date', models.DateTimeField(blank=True, null=True)),
                ('publish_time', models.DateTimeField(blank=True, null=True)),
                ('disable_time', models.DateTimeField(blank=True, null=True)),
                ('create_time', models.DateTimeField(blank=True, null=True)),
                ('disable_cause', models.CharField(blank=True, max_length=200, null=True)),
                ('status', models.PositiveIntegerField(choices=[(0, 'to be completed'), (1, 'to be verified'), (2, 'to be published'), (3, 'online'), (4, 'disabled'), (5, 'transcoding'), (6, 'transcode failure')], default=0)),
                ('download_rights', models.PositiveIntegerField(blank=True, choices=[(0, 'allow'), (1, 'not allow')], null=True)),
                ('share_rights', models.PositiveIntegerField(blank=True, choices=[(0, 'allow'), (1, 'not allow')], null=True)),
                ('derivate_rights', models.PositiveIntegerField(blank=True, choices=[(0, 'allow'), (1, 'not allow')], null=True)),
                ('categories', models.ManyToManyField(to='cms_test2.Category')),
                ('genres', models.ManyToManyField(to='cms_test2.Genre')),
                ('language', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cms_test2.Language')),
                ('publisher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cms_test2.Publisher')),
                ('short_video_info', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cms_test2.ShortVideoInfo')),
            ],
        ),
        migrations.AddField(
            model_name='shortvideolangpack',
            name='thumbnails',
            field=models.ManyToManyField(to='cms_test2.Thumbnail'),
        ),
        migrations.AddField(
            model_name='shortvideoinfo',
            name='relation_video',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='cms_test2.Video'),
        ),
    ]
