# Generated by Django 2.1.2 on 2018-11-10 10:13

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AuthorInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nickname', models.CharField(max_length=255, verbose_name='作者')),
                ('jianjie', models.TextField(verbose_name='作者简介')),
                ('sex', models.CharField(choices=[('男', '男'), ('女', '女')], max_length=255, verbose_name='性别')),
            ],
            options={
                'verbose_name_plural': '作者管理',
            },
        ),
        migrations.CreateModel(
            name='BookInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bname', models.CharField(max_length=255, verbose_name='书名')),
                ('bpic', models.ImageField(blank=True, null=True, upload_to='poster/%Y/%m/%d', verbose_name='本书封面')),
                ('ishot', models.BooleanField(verbose_name='是否推荐')),
                ('ishot0', models.BooleanField(verbose_name='是否经典推荐')),
                ('lastupdatime', models.DateField(verbose_name='最后更新时间')),
                ('score', models.FloatField(verbose_name='评分')),
                ('words', models.IntegerField(verbose_name='全文字数')),
                ('allhit', models.IntegerField(verbose_name='点击数')),
                ('allgroom', models.IntegerField(verbose_name='总推荐数')),
                ('weekgroom', models.IntegerField(verbose_name='周推荐数')),
                ('context', models.TextField(verbose_name='内容简介')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ireader.AuthorInfo', verbose_name='作者')),
            ],
            options={
                'verbose_name_plural': '书籍添加',
            },
        ),
        migrations.CreateModel(
            name='BookProperty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('property', models.CharField(max_length=255, verbose_name='作品性质')),
            ],
            options={
                'verbose_name_plural': '作品性质',
            },
        ),
        migrations.CreateModel(
            name='BookTypeInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('typename', models.CharField(max_length=255, verbose_name='类别')),
            ],
            options={
                'verbose_name_plural': '图书分类',
            },
        ),
        migrations.CreateModel(
            name='Chaper',
            fields=[
                ('id', models.ImageField(upload_to='')),
                ('cname', models.CharField(max_length=255, primary_key=True, serialize=False, verbose_name='章节名')),
                ('context', tinymce.models.HTMLField(null=True, verbose_name='章节内容')),
                ('resid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ireader.BookInfo', verbose_name='章节')),
            ],
        ),
        migrations.CreateModel(
            name='SlideInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sname', models.CharField(max_length=255, verbose_name='幻灯片名称')),
                ('spic', models.ImageField(blank=True, null=True, upload_to='pic', verbose_name='大幻灯片的路径')),
                ('enabled', models.BooleanField(verbose_name='是否可用')),
                ('context', models.TextField(verbose_name='内容简介')),
                ('slide_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ireader.BookInfo', verbose_name='小说id')),
            ],
            options={
                'verbose_name_plural': '幻灯片管理',
            },
        ),
        migrations.CreateModel(
            name='WorkProcess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('process', models.CharField(max_length=255, verbose_name='写作进度')),
            ],
            options={
                'verbose_name_plural': '写作进度',
            },
        ),
        migrations.AddField(
            model_name='bookinfo',
            name='bprocess',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ireader.WorkProcess', verbose_name='连载状态'),
        ),
        migrations.AddField(
            model_name='bookinfo',
            name='bproperty',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ireader.BookProperty', verbose_name='作品性质'),
        ),
        migrations.AddField(
            model_name='bookinfo',
            name='btype',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ireader.BookTypeInfo', verbose_name='作品分类'),
        ),
    ]
