# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-26 10:23
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='banner', verbose_name='轮播图片')),
                ('index', models.IntegerField(default=0, verbose_name='轮播顺序')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
            },
        ),
        migrations.CreateModel(
            name='GoodCS',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('goods_size', models.CharField(choices=[('35', '35'), ('36', '36'), ('37', '37'), ('38', '38'), ('39', '39'), ('40', '40'), ('41', '41'), ('42', '42'), ('43', '43'), ('44', '44'), ('45', '45'), ('S', 'S'), ('M', 'M'), ('L', 'L'), ('XL', 'XL'), ('均码', '均码')], max_length=5, verbose_name='尺码')),
                ('goods_color', models.CharField(blank=True, max_length=10, null=True, verbose_name='颜色')),
                ('goods_num', models.IntegerField(default=0, verbose_name='库存数')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '商品色码',
                'verbose_name_plural': '商品色码',
            },
        ),
        migrations.CreateModel(
            name='GoodImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to='goods/images/', verbose_name='图片')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('cs', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='img', to='goods.GoodCS', verbose_name='商品色码')),
            ],
            options={
                'verbose_name': '商品图片',
                'verbose_name_plural': '商品图片',
            },
        ),
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(choices=[('踩的', '踩的'), ('穿的', '穿的'), ('戴的', '戴的')], default='踩的', help_text='类别', max_length=30, verbose_name='类别')),
                ('goods_sn', models.CharField(default='', max_length=50, verbose_name='商品货号')),
                ('name', models.CharField(max_length=100, verbose_name='商品名')),
                ('sold_num', models.IntegerField(default=0, verbose_name='商品销售量')),
                ('fav_num', models.IntegerField(default=0, verbose_name='收藏数')),
                ('price', models.FloatField(default=0, verbose_name='价格')),
                ('gender', models.CharField(choices=[('male', '男的'), ('female', '女的'), ('neutral', '男女同款')], default='female', max_length=6, verbose_name='性别')),
                ('goods_desc', DjangoUeditor.models.UEditorField(default='', verbose_name='内容')),
                ('goods_front_image', models.ImageField(blank=True, null=True, upload_to='goods/images/', verbose_name='封面图')),
                ('is_new', models.BooleanField(default=False, verbose_name='是否新品')),
                ('is_hot', models.BooleanField(default=False, verbose_name='是否热销')),
                ('is_sale', models.BooleanField(default=False, verbose_name='是否优惠')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '商品',
                'verbose_name_plural': '商品',
            },
        ),
        migrations.AddField(
            model_name='goodcs',
            name='goods',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cs', to='goods.Goods', verbose_name='商品'),
        ),
    ]
