# Generated by Django 3.0.6 on 2020-06-05 09:01

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),
        ('ugc_mod', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='UgcMod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=20, unique=True, verbose_name='标题')),
                ('status', models.SmallIntegerField(verbose_name='状态')),
                ('content', models.TextField(verbose_name='mod内容')),
                ('create', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='创建者id')),
            ],
            options={
                'verbose_name': '模型表',
                'verbose_name_plural': '模型表',
                'db_table': 'ugc_mod',
            },
        ),
        migrations.CreateModel(
            name='ModComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_content', models.CharField(max_length=100, verbose_name='评论内容')),
                ('star', models.SmallIntegerField(default=0, verbose_name='评分')),
                ('mod', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ugc_mod.UgcMod')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'mod评论表',
                'verbose_name_plural': 'mod评论表',
                'db_table': 'ugc_mod_comment',
            },
        ),
        migrations.CreateModel(
            name='ModUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mod', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ugc_mod.UgcMod')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'mod/拥有着关系表',
                'verbose_name_plural': 'mod/拥有着关系表',
                'db_table': 'ugc_mod_user',
                'unique_together': {('mod', 'user')},
                'index_together': {('mod', 'user')},
            },
        ),
    ]
