text: # Generated by Django 2.0.4 on 2019-03-26 15:39
  
  import datetime
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('goods', '0001_initial'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='OrderGoods',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('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='OrderInfo',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('order_sn', models.CharField(blank=True, max_length=30, null=True, unique=True, verbose_name='订单编号')),
                  ('nonce_str', models.CharField(blank=True, max_length=50, null=True, unique=True, verbose_name='随机加密串')),
                  ('trade_no', models.CharField(blank=True, max_length=100, null=True, unique=True, verbose_name='交易号')),
                  ('pay_status', models.CharField(choices=[('TRADE_SUCCESS', '成功'), ('TRADE_CLOSED', '超时关闭'), ('WAIT_BUYER_PAY', '交易创建'), ('TRADE_FINISHED', '交易结束'), ('paying', '待支付')], default='paying', max_length=30, verbose_name='订单状态')),
                  ('pay_type', models.CharField(choices=[('alipay', '支付宝'), ('wechat', '微信')], default='alipay', max_length=10, verbose_name='支付类型')),
                  ('post_script', models.CharField(max_length=200, verbose_name='订单留言')),
                  ('order_mount', models.FloatField(default=0.0, verbose_name='订单金额')),
                  ('pay_time', models.DateTimeField(blank=True, null=True, verbose_name='支付时间')),
                  ('address', models.CharField(default='', max_length=100, verbose_name='收货地址')),
                  ('signer_name', models.CharField(default='', max_length=20, verbose_name='签收人')),
                  ('singer_mobile', models.CharField(max_length=11, verbose_name='联系电话')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
              ],
              options={
                  'verbose_name': '订单信息',
                  'verbose_name_plural': '订单信息',
              },
          ),
          migrations.CreateModel(
              name='ShoppingCart',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('nums', models.IntegerField(default=0, verbose_name='购买数量')),
                  ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                  ('goods', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='goods.Goods', verbose_name='商品')),
              ],
              options={
                  'verbose_name': '购物车喵',
                  'verbose_name_plural': '购物车喵',
              },
          ),
      ]
  