# Generated by Django 3.1.7 on 2021-04-21 13:18

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='ClientUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=50, unique=True)),
                ('password', models.CharField(max_length=255)),
                ('avatar', models.CharField(default='', max_length=500)),
                ('gender', models.CharField(default='', max_length=20)),
                ('birthday', models.DateTimeField(blank=True, default=None, null=True)),
                ('status', models.BooleanField(db_index=True, default=True)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('videoName', models.CharField(max_length=100)),
                ('image', models.CharField(default='', max_length=500)),
                ('videoType', models.CharField(default='other', max_length=50)),
                ('source', models.CharField(default='custom', max_length=20)),
                ('nation', models.CharField(default='other', max_length=5)),
                ('desc', models.TextField()),
                ('status', models.BooleanField(db_index=True, default=True)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('updateTime', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='video', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('user', 'videoName', 'videoType', 'source', 'nation')},
            },
        ),
        migrations.CreateModel(
            name='VideoStar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('identity', models.CharField(default='', max_length=50)),
                ('video', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='videoStar', to='app.video')),
            ],
            options={
                'unique_together': {('video', 'name', 'identity')},
            },
        ),
        migrations.CreateModel(
            name='VideoDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('url', models.CharField(max_length=500)),
                ('number', models.IntegerField(default=1)),
                ('video', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='videoDetail', to='app.video')),
            ],
            options={
                'unique_together': {('video', 'number')},
            },
        ),
        migrations.CreateModel(
            name='CustomVideo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('public_id', models.CharField(default='', max_length=100)),
                ('url', models.CharField(max_length=500)),
                ('name', models.CharField(max_length=50)),
                ('video', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customVideo', to='app.video')),
            ],
            options={
                'unique_together': {('video', 'public_id', 'name')},
            },
        ),
    ]
