# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-29 16:44
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('user', '0017_storeunreserve'),
    ]

    operations = [
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='名称')),
                ('start', models.DateTimeField(verbose_name='开始时间')),
                ('end', models.DateTimeField(verbose_name='结束时间')),
                ('notice_before', models.IntegerField(verbose_name='提前通知天数')),
                ('notice_content', models.CharField(max_length=200, verbose_name='通知内容')),
                ('detail_master', models.CharField(max_length=200, verbose_name='优惠券详情 - 主')),
                ('detail_minor', models.CharField(max_length=200, verbose_name='优惠券险情 - 次')),
                ('slogan', models.CharField(max_length=300, verbose_name='口号')),
                ('start_show', models.DateTimeField(verbose_name='展示时间')),
                ('category', models.ManyToManyField(to='user.FoodCategory', verbose_name='打折类别')),
                ('food', models.ManyToManyField(to='user.Food', verbose_name='打折商品')),
                ('store', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Stores', verbose_name='门店')),
            ],
            options={
                'verbose_name': '优惠券 - 优惠券',
                'verbose_name_plural': '优惠券 - 优惠券',
            },
        ),
        migrations.CreateModel(
            name='CouponTime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start', models.DateTimeField(verbose_name='开始时间')),
                ('end', models.DateTimeField(verbose_name='结束时间')),
                ('coupon', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Coupon', verbose_name='优惠券')),
            ],
            options={
                'verbose_name': '优惠券 - 有效期',
                'verbose_name_plural': '优惠券 - 有效期',
            },
        ),
        migrations.CreateModel(
            name='DiscountCoupon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coupon_type', models.IntegerField(choices=[(0, '定额'), (1, '折扣'), (2, '满赠')], verbose_name='折扣类型')),
                ('quota', models.IntegerField(blank=True, null=True, verbose_name='定额优惠金额')),
                ('discount', models.IntegerField(blank=True, null=True, verbose_name='折扣')),
                ('more_gift', models.IntegerField(blank=True, null=True, verbose_name='满赠个数')),
                ('count', models.IntegerField(blank=True, null=True, verbose_name='发放张数')),
                ('daily_limit', models.IntegerField(blank=True, null=True, verbose_name='每日每人限额')),
                ('single_limit', models.IntegerField(blank=True, null=True, verbose_name='单人限额')),
                ('coupon', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='user.Coupon', verbose_name='优惠券')),
                ('gift', models.ManyToManyField(to='user.Food', verbose_name='赠品')),
            ],
            options={
                'verbose_name': '优惠券 - 折扣优惠券',
                'verbose_name_plural': '优惠券 - 折扣优惠券',
            },
        ),
    ]
