# Generated by Django 2.1.1 on 2018-10-20 11:24

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('user', '0010_adminmsg'),
    ]

    operations = [
        migrations.CreateModel(
            name='Collect',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Resource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40, null=True)),
                ('download_count', models.IntegerField(default=0)),
                ('need_integral', models.IntegerField(default=0)),
                ('upload_time', models.DateTimeField(auto_now_add=True)),
                ('like_num', models.IntegerField(default=0)),
                ('share_num', models.IntegerField(default=0)),
                ('title', models.CharField(max_length=80, null=True)),
                ('describe', models.CharField(max_length=80, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ResourceType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
            ],
        ),
        migrations.AddField(
            model_name='resource',
            name='resourceTypeId',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='file.ResourceType'),
        ),
        migrations.AddField(
            model_name='resource',
            name='upload_user',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='user.User'),
        ),
        migrations.AddField(
            model_name='collect',
            name='resource',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='file.Resource'),
        ),
        migrations.AddField(
            model_name='collect',
            name='user',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='user.User'),
        ),
    ]
