# Generated by Django 2.2.4 on 2019-08-12 02:37

import apps.video.models
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='VideoCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_name', models.CharField(max_length=16, verbose_name='分类名')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='拥有者')),
            ],
            options={
                'verbose_name': '视频分类',
                'verbose_name_plural': '视频分类',
                'db_table': 'bv_video_category',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128, verbose_name='视频标题')),
                ('file', models.FileField(upload_to=apps.video.models.Video.video_upload_path, verbose_name='视频文件')),
                ('upload_time', models.DateTimeField(auto_now_add=True, verbose_name='上传日期')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='视频作者')),
                ('video_categories', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='video.VideoCategory', verbose_name='视频分类')),
            ],
            options={
                'verbose_name': '视频',
                'verbose_name_plural': '视频',
                'db_table': 'bv_video',
            },
        ),
    ]
