# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-09-25 03:57
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('user', '0004_usermodel_fromshome'),
    ]

    operations = [
        migrations.CreateModel(
            name='CartAddress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('userID', models.CharField(max_length=20, verbose_name='用户ID')),
                ('name', models.CharField(max_length=20, verbose_name='收货人姓名')),
                ('phone', models.CharField(max_length=11, validators=[django.core.validators.MinLengthValidator(11), django.core.validators.RegexValidator('^1[3-9]\\d{9}$', '手机号码格式错误！')], verbose_name='手机号码')),
                ('defaultAddr', models.BooleanField(default=False, verbose_name='设置默认地址')),
            ],
            options={
                'db_table': 'CartAddress',
            },
        ),
        migrations.CreateModel(
            name='CartCommodity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CartNumber', models.SmallIntegerField(verbose_name='商品数量')),
                ('CartPrice', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='商品价格')),
            ],
            options={
                'db_table': 'CartCommodity',
            },
        ),
        migrations.CreateModel(
            name='CartInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('number', models.SmallIntegerField(verbose_name='订单编号')),
                ('money', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='订单金额')),
                ('userId', models.CharField(max_length=50, verbose_name='用户ID')),
                ('ReceiptUser', models.CharField(max_length=20, verbose_name='收货人姓名')),
                ('phone', models.CharField(max_length=11, validators=[django.core.validators.MinLengthValidator(11), django.core.validators.RegexValidator('^1[3-9]\\d{9}$', '手机号码格式错误！')], verbose_name='手机号码')),
                ('address', models.CharField(max_length=200, verbose_name='收货地址')),
                ('status', models.BooleanField(choices=[(0, '待付款'), (1, '退发货'), (2, '待收货'), (3, '待评价'), (4, '已完成')], verbose_name='收货状态')),
                ('cash', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='实付金额')),
            ],
            options={
                'db_table': 'CartInfo',
            },
        ),
        migrations.CreateModel(
            name='CartTransport',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('name', models.CharField(max_length=100, verbose_name='运输名称')),
                ('TPrice', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='动费')),
            ],
            options={
                'db_table': 'CartTransport',
            },
        ),
        migrations.CreateModel(
            name='Goods_cla',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('cla_name', models.CharField(max_length=100, verbose_name='商品分类名')),
                ('cla_info', models.CharField(max_length=200, verbose_name='商品分类简介')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Goods_Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('photo_goods_img', models.ImageField(default=None, upload_to='', verbose_name='商品图片')),
            ],
            options={
                'db_table': 'Goods_Photo',
            },
        ),
        migrations.CreateModel(
            name='Goods_SKU',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('sku_name', models.CharField(max_length=100, verbose_name='商品名')),
                ('sku_info', models.CharField(max_length=100, verbose_name='商品简介')),
                ('sku_price', models.DecimalField(decimal_places=3, max_digits=10, verbose_name='商品价格')),
                ('sku_reserve', models.IntegerField(verbose_name='商品库存')),
                ('sku_sales', models.IntegerField(verbose_name='销量')),
                ('sku_logo', models.ImageField(default=None, upload_to='', verbose_name='logo')),
                ('sku_Shelf', models.BooleanField(default=False, verbose_name='是否上架')),
                ('sku_cla_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pk', to='user.Goods_cla', verbose_name='商品分类ID')),
            ],
            options={
                'verbose_name': '商品SKU表',
                'verbose_name_plural': '商品SKU表',
            },
        ),
        migrations.CreateModel(
            name='Goods_SPU',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('spu_name', models.CharField(max_length=50, verbose_name='商品SPU_name')),
                ('spu_info', models.TextField(max_length=100, verbose_name='商品详情')),
            ],
            options={
                'db_table': 'Goods_SPU',
            },
        ),
        migrations.CreateModel(
            name='Goods_Unit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('unit_goods_unit', models.SmallIntegerField(choices=[(0, ''), (1, '斤'), (2, '箱'), (3, '件'), (4, '条'), (5, '套')], default=0, verbose_name='商品单位')),
            ],
            options={
                'db_table': 'Goods_Unit',
            },
        ),
        migrations.CreateModel(
            name='IndexActive',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='活动名称')),
                ('img', models.ImageField(upload_to='', verbose_name='活动商品图片')),
                ('urladdr', models.URLField(verbose_name='活动url')),
            ],
            options={
                'db_table': 'IndexActive',
            },
        ),
        migrations.CreateModel(
            name='IndexFlashImg',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('flashName', models.CharField(max_length=50, verbose_name='首页轮播商品')),
                ('goods', models.CharField(max_length=50, verbose_name='商品')),
                ('img', models.ImageField(upload_to='', verbose_name='图片URL')),
                ('order', models.SmallIntegerField(verbose_name='排序')),
            ],
            options={
                'db_table': 'IndexFlashImg',
            },
        ),
        migrations.CreateModel(
            name='IndexZone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('ZoneName', models.CharField(max_length=50, verbose_name='活动专区名称')),
                ('ZoneInfo', models.CharField(max_length=200, verbose_name='活动专区简介')),
                ('order', models.SmallIntegerField(verbose_name='排序')),
                ('Shelf', models.BooleanField(default=False, verbose_name='是否上架')),
            ],
            options={
                'db_table': 'IndexZone',
            },
        ),
        migrations.CreateModel(
            name='IndexZoneActive',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('ZoneId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.IndexZone', verbose_name='专区ID')),
                ('skuId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Goods_Photo', verbose_name='专区商品skuid')),
            ],
            options={
                'db_table': 'IndexZoneActive',
            },
        ),
        migrations.CreateModel(
            name='Pays',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('name', models.CharField(max_length=20, verbose_name='名称')),
                ('photo', models.ImageField(upload_to='', verbose_name='图片')),
            ],
            options={
                'db_table': 'Pays',
            },
        ),
        migrations.AddField(
            model_name='goods_sku',
            name='sku_spu_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pk', to='user.Goods_SPU', verbose_name='商品SPU_ID'),
        ),
        migrations.AddField(
            model_name='goods_sku',
            name='sku_unit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pk', to='user.Goods_Unit', verbose_name='商品单位'),
        ),
        migrations.AddField(
            model_name='goods_photo',
            name='photo_goods_skuid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pk', to='user.Goods_SKU', verbose_name='商品SKU_ID'),
        ),
        migrations.AddField(
            model_name='cartinfo',
            name='pay',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Pays', verbose_name='付款方式'),
        ),
        migrations.AddField(
            model_name='cartinfo',
            name='transport',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.CartTransport', verbose_name='运输方式'),
        ),
        migrations.AddField(
            model_name='cartcommodity',
            name='CartId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.CartInfo', verbose_name='订单ID'),
        ),
        migrations.AddField(
            model_name='cartcommodity',
            name='CartSkuId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.Goods_Photo', verbose_name='商品SKUID'),
        ),
        migrations.AddField(
            model_name='cartaddress',
            name='address',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.CartInfo', verbose_name='详细地址'),
        ),
    ]
