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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('books', '0001_initial'),
        ('subject', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='\u540d\u79f0')),
                ('desc', models.CharField(max_length=256, verbose_name='\u63cf\u8ff0')),
                ('url', models.CharField(blank=True, max_length=256, null=True, verbose_name='web')),
                ('img', models.ImageField(storage=utils.storage.ImageStorage(), upload_to=b'banners/', verbose_name='\u56fe\u7247')),
                ('type', models.IntegerField(choices=[(2, '\u7cbe\u9009\u5e7f\u544a'), (1, '\u4e66\u67b6\u5e7f\u544a')], default=0, verbose_name='\u7c7b\u578b')),
                ('order', models.IntegerField(default=0, verbose_name='\u6392\u5e8f')),
                ('status', models.IntegerField(choices=[(0, '\u5ba1\u6838'), (1, '\u4e0a\u67b6'), (2, '\u4e0b\u67b6')], default=0, verbose_name='\u72b6\u6001')),
                ('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')),
                ('book', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='book', to='books.Book')),
                ('topic', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='topic', to='subject.Topic')),
            ],
            options={
                'ordering': ('order',),
                'db_table': 't_banner',
                'verbose_name': '\u5e7f\u544a',
                'verbose_name_plural': '\u5e7f\u544a',
            },
        ),
    ]
