# Generated by Django 2.0.2 on 2018-09-11 14:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('author', models.CharField(max_length=20)),
                ('pub_company', models.CharField(max_length=50)),
                ('pub_time', models.DateField()),
                ('revision', models.IntegerField()),
                ('ISBN', models.CharField(max_length=64)),
                ('word_count', models.IntegerField()),
                ('page_count', models.IntegerField()),
                ('page_type', models.CharField(max_length=64)),
                ('paper', models.CharField(max_length=64)),
                ('wrapper', models.CharField(max_length=64)),
                ('price', models.FloatField()),
                ('dprice', models.FloatField()),
                ('editor_recommend', models.CharField(max_length=2000)),
                ('digest_img', models.ImageField(upload_to='book_digest_pic')),
                ('book_img', models.ImageField(upload_to='book_pic')),
                ('print_time', models.DateField()),
                ('impression', models.CharField(max_length=64)),
                ('stock', models.IntegerField()),
                ('online_date', models.DateField()),
                ('score', models.IntegerField()),
                ('sales', models.IntegerField()),
            ],
            options={
                'db_table': 't_book',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_name', models.CharField(max_length=20)),
                ('book_counts', models.IntegerField()),
                ('category_p', models.IntegerField()),
            ],
            options={
                'db_table': 't_category',
            },
        ),
        migrations.AddField(
            model_name='book',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='index_app.Category'),
        ),
    ]
