# Generated by Django 2.0.6 on 2019-07-31 22:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='OrderInfo',
            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='删除标记')),
                ('address', models.CharField(max_length=255, null=True, verbose_name='收件地址')),
                ('name', models.CharField(max_length=30, null=True, verbose_name='收件人姓名')),
                ('phone', models.CharField(max_length=11, null=True, verbose_name='收件人手机')),
                ('order_id', models.CharField(max_length=255, verbose_name='订单号')),
                ('commodity_total_price', models.FloatField(verbose_name='商品总价')),
                ('total_price', models.FloatField(verbose_name='订单总价')),
                ('total_count', models.IntegerField(verbose_name='订单总件数')),
                ('transit_price', models.FloatField(default=0, verbose_name='运费')),
                ('discount_price', models.FloatField(default=0, verbose_name='优惠金额')),
                ('state', models.SmallIntegerField(choices=[(0, '未支付'), (1, '已支付'), (2, '待发货'), (3, '已发货'), (4, '已完成'), (5, '待退款'), (6, '已关闭'), (7, '退款成功')], default=0, verbose_name='订单状态')),
                ('courier_number', models.CharField(default='', max_length=255, verbose_name='快递单号')),
                ('returns_number', models.CharField(default='', max_length=255, verbose_name='退货单号')),
                ('note', models.CharField(default='', max_length=255, verbose_name='备注')),
                ('cancel_time', models.CharField(max_length=30, null=True, verbose_name='取消时间')),
                ('complete_time', models.CharField(max_length=30, null=True, verbose_name='完成时间')),
            ],
            options={
                'verbose_name': '订单表',
                'verbose_name_plural': '订单表',
                'db_table': 'gd_order_info',
            },
        ),
        migrations.CreateModel(
            name='OrderList',
            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='删除标记')),
                ('commodity_name', models.CharField(max_length=255, verbose_name='商品名称')),
                ('commodity_specifications', models.CharField(max_length=255, verbose_name='商品规格')),
                ('commodity_price', models.FloatField(verbose_name='商品单价')),
                ('commodity_count', models.IntegerField(verbose_name='商品数量')),
                ('commodity_image', models.CharField(max_length=255, verbose_name='商品图片')),
            ],
            options={
                'verbose_name': '订单清单表',
                'verbose_name_plural': '订单清单表',
                'db_table': 'gd_order_list',
            },
        ),
        migrations.CreateModel(
            name='WxOrder',
            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='删除标记')),
                ('wx_order', models.CharField(max_length=255, verbose_name='微信支付订单号')),
                ('pay_time', models.CharField(max_length=30, null=True, verbose_name='支付完成时间')),
                ('order_info', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='order.OrderInfo', verbose_name='订单号')),
            ],
            options={
                'verbose_name': '微信支付订单',
                'verbose_name_plural': '微信支付订单',
                'db_table': 'gd_wx_order',
            },
        ),
    ]
