# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-07 11:29
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='\u540d\u79f0')),
                ('brief', models.CharField(max_length=256, verbose_name='\u7b80\u4ecb')),
                ('desc', models.CharField(blank=True, max_length=512, null=True, verbose_name='\u63cf\u8ff0')),
                ('cover', models.ImageField(blank=True, null=True, storage=utils.storage.ImageStorage(), upload_to=b'images/', verbose_name='\u81ea\u5b9a\u4e49\u56fe\u7247')),
                ('cover_url', models.CharField(blank=True, max_length=256, null=True, verbose_name='\u5927\u56feurl')),
                ('cover_url_small', models.CharField(blank=True, max_length=256, null=True, verbose_name='\u5c0f\u56feurl')),
                ('status', models.IntegerField(choices=[(1, '\u8fde\u8f7d'), (0, '\u5b8c\u7ed3')], default=0, verbose_name='\u72b6\u6001')),
                ('first_cid', models.CharField(blank=True, max_length=64, null=True, verbose_name='\u7b2c\u4e00\u7ae0id')),
                ('last_cid', models.CharField(blank=True, max_length=64, null=True, verbose_name='\u5012\u6570\u7b2c\u4e00\u7ae0id')),
                ('chapter_size', models.IntegerField(default=0, verbose_name='\u7ae0\u8282\u6570')),
                ('score', models.FloatField(default=0, verbose_name='\u5206\u6570')),
                ('word_size', models.CharField(blank=True, max_length=64, null=True, verbose_name='\u5b57\u6570')),
                ('click_amount', models.IntegerField(default=0, verbose_name='\u70b9\u51fb\u91cf')),
                ('kw', models.CharField(blank=True, max_length=256, null=True, verbose_name='\u5173\u952e\u5b57')),
                ('price', models.IntegerField(default=0, verbose_name='\u4ef7\u683c(\u5206)')),
                ('charge_mode', models.IntegerField(choices=[(1, '\u7ae0\u8282'), (0, '\u6574\u672c')], default=0, verbose_name='\u4ed8\u8d39\u6a21\u5f0f')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='\u4fee\u6539\u65f6\u95f4')),
                ('author', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='\u4f5c\u8005')),
            ],
            options={
                'db_table': 't_book',
                'verbose_name': '\u56fe\u4e66',
                'verbose_name_plural': '\u56fe\u4e66',
            },
        ),
        migrations.CreateModel(
            name='Content',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prev_cid', models.IntegerField(default=0, verbose_name='\u4e0a\u4e00\u7ae0id')),
                ('next_cid', models.IntegerField(default=0, verbose_name='\u4e0b\u4e00\u7ae0id')),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='books.Book')),
            ],
            options={
                'db_table': 't_content',
                'verbose_name': '\u76ee\u5f55',
                'verbose_name_plural': '\u76ee\u5f55',
            },
        ),
    ]
