# Generated by Django 2.2.6 on 2019-12-01 16:01

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('home', '0003_auto_20191107_1918'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('comment', models.TextField(default='', verbose_name='长评')),
                ('commentTitle', models.CharField(default='', max_length=40, verbose_name='长评标题')),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('modifyTime', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='book',
            name='image',
            field=models.ImageField(default=django.utils.timezone.now, upload_to='photos'),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='Read',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('comment', models.CharField(default='', max_length=200, verbose_name='短评')),
                ('rating', models.IntegerField(choices=[(1, '差评'), (2, '一般'), (3, '好评')], default=2)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('modifyTime', models.DateTimeField(auto_now=True)),
                ('readBook', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.Book')),
                ('readUser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LikeRead',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('read', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.Read')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='LikeComment',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.Comment')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('FollowUser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='FollowUser', to=settings.AUTH_USER_MODEL)),
                ('beFollowedUser', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='beFollowedUser', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='comment',
            name='commentBook',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.Book'),
        ),
        migrations.AddField(
            model_name='comment',
            name='commentUser',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
