# Generated by Django 2.1 on 2018-11-13 02:46

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


class Migration(migrations.Migration):

    dependencies = [
        ('web_models', '0011_auto_20181112_1017'),
    ]

    operations = [
        migrations.CreateModel(
            name='Classification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('weight', models.IntegerField(default=0, verbose_name='权重')),
                ('name', models.CharField(max_length=32, verbose_name='名称')),
            ],
            options={
                'db_table': 'Classification',
                'verbose_name_plural': '视频分类',
            },
        ),
        migrations.CreateModel(
            name='Direction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('weight', models.IntegerField(default=0, verbose_name='权重（按从大到小排列）')),
                ('name', models.CharField(max_length=32, verbose_name='名称')),
                ('classification', models.ManyToManyField(to='web_models.Classification')),
            ],
            options={
                'db_table': 'Direction',
                'verbose_name_plural': '视频方向',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(0, '下线'), (1, '上线')], default=1, verbose_name='状态')),
                ('level', models.IntegerField(choices=[(0, '初级'), (1, '中级'), (2, '高级')], default=1, verbose_name='级别')),
                ('weight', models.IntegerField(default=0, verbose_name='权重（按从大到小）')),
                ('title', models.CharField(max_length=32, verbose_name='视频标题')),
                ('summary', models.CharField(max_length=32, verbose_name='简介')),
                ('img', models.ImageField(upload_to='./static/images/Video/', verbose_name='视频封面')),
                ('href', models.CharField(max_length=256, verbose_name='视频地址')),
                ('create_date', models.DateTimeField(auto_now_add=True)),
                ('classification', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='web_models.Classification')),
            ],
            options={
                'db_table': 'Video',
                'verbose_name_plural': '视频',
            },
        ),
    ]
