# Generated by Django 2.0 on 2019-05-22 21:35

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')),
                ('title', models.CharField(blank=True, max_length=50, null=True, verbose_name='书名')),
                ('author', models.CharField(default='未名', max_length=300, verbose_name='作者')),
                ('binding', models.CharField(blank=True, max_length=20, null=True, verbose_name='精装')),
                ('publisher', models.CharField(max_length=50, verbose_name='出版社')),
                ('pubdate', models.CharField(default='1900-01', max_length=50, verbose_name='出版年')),
                ('price', models.FloatField(verbose_name='定价')),
                ('pages', models.IntegerField(verbose_name='页数')),
                ('isbn', models.CharField(blank=True, max_length=15, null=True, unique=True, verbose_name='isbn')),
                ('summary', models.CharField(max_length=1000, verbose_name='内容简介')),
                ('image', models.ImageField(upload_to='uploads/book/%Y/%m', verbose_name='书籍图片')),
                ('date', models.DateTimeField(auto_now=True, verbose_name='添加日期')),
            ],
            options={
                'verbose_name': '书籍表',
                'verbose_name_plural': '书籍表',
                'db_table': 'book',
            },
        ),
        migrations.CreateModel(
            name='Gift',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('launched', models.BooleanField(default=False, verbose_name='是否赠送')),
                ('date', models.DateTimeField(auto_now=True, verbose_name='添加日期')),
            ],
            options={
                'verbose_name': '赠送清单',
                'verbose_name_plural': '赠送清单',
                'db_table': 'gift',
            },
        ),
        migrations.CreateModel(
            name='Wish',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('launched', models.BooleanField(default=False, verbose_name='是否赠送')),
                ('date', models.DateTimeField(auto_now=True, verbose_name='添加日期')),
                ('bookid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wish_book', to='books.Book', verbose_name='书籍')),
            ],
            options={
                'verbose_name': '心愿清单',
                'verbose_name_plural': '心愿清单',
                'db_table': 'wish',
            },
        ),
    ]
