# Generated by Django 2.2 on 2019-11-09 14:24

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='Favorites',
            fields=[
                ('favorites_id', models.AutoField(primary_key=True, serialize=False, verbose_name='收藏夹id')),
                ('title', models.CharField(max_length=40, verbose_name='收藏夹名称')),
                ('desc', models.CharField(max_length=1024, verbose_name='收藏夹描述')),
                ('crt_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('upd_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='创建者')),
            ],
            options={
                'db_table': 'favorites',
            },
        ),
        migrations.CreateModel(
            name='Collection',
            fields=[
                ('collection_id', models.AutoField(primary_key=True, serialize=False, verbose_name='收藏id')),
                ('resource_id', models.IntegerField(unique=True, verbose_name='收藏资源id')),
                ('resource_type', models.CharField(max_length=2, verbose_name='收藏资源类型')),
                ('crt_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('upd_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='创建者')),
                ('favlists', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='favlists.Favorites', verbose_name='收藏夹')),
            ],
            options={
                'db_table': 'collection',
            },
        ),
    ]
