# Generated by Django 2.2.1 on 2019-10-14 05:57

import ckeditor.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='PromoCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('updated', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=20, verbose_name='类别名称')),
                ('code', models.CharField(max_length=20, verbose_name='类别代码')),
            ],
            options={
                'db_table': 'promo_category',
            },
        ),
        migrations.CreateModel(
            name='Promo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='标题')),
                ('time', models.CharField(max_length=255, verbose_name='显示时间')),
                ('content', ckeditor.fields.RichTextField(blank=True, null=True)),
                ('link', models.CharField(blank=True, max_length=255, null=True, verbose_name='链接')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('banner', models.ImageField(blank=True, null=True, upload_to='promoIntro', verbose_name='图片')),
                ('isLink', models.BooleanField(default=False, verbose_name='是否直接链接')),
                ('isExpired', models.BooleanField(default=False, verbose_name='是否已过期')),
                ('sort', models.IntegerField(default=1, verbose_name='排序')),
                ('category', models.ManyToManyField(to='PromoIntro.PromoCategory')),
            ],
            options={
                'db_table': 'promo_item',
                'ordering': ['-sort'],
            },
        ),
    ]
