# Generated manually for UFO turntable + zone icon

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('products', '0012_shangpin_zhuanqu_club_id'),
    ]

    operations = [
        migrations.AddField(
            model_name='shangpinzhuanqu',
            name='tupian_url',
            field=models.CharField(
                blank=True, default='', max_length=500, null=True,
                verbose_name='专区图标URL',
            ),
        ),
        migrations.AddField(
            model_name='shangpin',
            name='shi_zhuanpan',
            field=models.BooleanField(
                db_index=True, default=False, verbose_name='是否转盘购票商品',
            ),
        ),
        migrations.CreateModel(
            name='ZhuanpanHuodong',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('club_id', models.CharField(db_index=True, max_length=16, verbose_name='俱乐部')),
                ('mingzi', models.CharField(default='幸运转盘', max_length=64, verbose_name='活动名')),
                ('shangpin_id', models.PositiveIntegerField(db_index=True, help_text='对应 Shangpin.id，且该商品建议 shi_zhuanpan=True', verbose_name='购票商品ID')),
                ('qiyong', models.BooleanField(db_index=True, default=True, verbose_name='是否启用')),
                ('beizhu', models.CharField(blank=True, default='', max_length=200, verbose_name='备注')),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': '转盘活动',
                'verbose_name_plural': '转盘活动',
                'db_table': 'zhuanpan_huodong',
            },
        ),
        migrations.CreateModel(
            name='ZhuanpanJiangpin',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('huodong_id', models.PositiveIntegerField(db_index=True, verbose_name='活动ID')),
                ('mingzi', models.CharField(max_length=64, verbose_name='奖品名')),
                ('tupian_url', models.CharField(blank=True, default='', max_length=500, verbose_name='奖品图')),
                ('shangpin_id', models.PositiveIntegerField(blank=True, db_index=True, null=True, verbose_name='中奖后履约商品ID')),
                ('quanzhong', models.PositiveIntegerField(default=1, verbose_name='中奖权重')),
                ('paixu', models.PositiveSmallIntegerField(default=0, verbose_name='格子序号')),
                ('shi_xiexie', models.BooleanField(default=False, verbose_name='是否谢谢参与')),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': '转盘奖品',
                'verbose_name_plural': '转盘奖品',
                'db_table': 'zhuanpan_jiangpin',
            },
        ),
        migrations.CreateModel(
            name='ZhuanpanJihui',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('club_id', models.CharField(db_index=True, max_length=16, verbose_name='俱乐部')),
                ('yonghuid', models.CharField(db_index=True, max_length=32, verbose_name='用户UID')),
                ('huodong_id', models.PositiveIntegerField(db_index=True, verbose_name='活动ID')),
                ('czjilu_dingdan_id', models.CharField(db_index=True, max_length=64, unique=True, verbose_name='支付流水单号')),
                ('jine', models.DecimalField(decimal_places=2, default=0, max_digits=10, verbose_name='购票金额')),
                ('zhuangtai', models.PositiveSmallIntegerField(db_index=True, default=9, verbose_name='状态')),
                ('nicheng', models.CharField(blank=True, default='', max_length=50, verbose_name='游戏昵称')),
                ('beizhu', models.CharField(blank=True, default='', max_length=200, verbose_name='备注')),
                ('zhongjiang_jiangpin_id', models.PositiveIntegerField(blank=True, null=True, verbose_name='中奖奖品ID')),
                ('zhongjiang_shangpin_id', models.PositiveIntegerField(blank=True, null=True, verbose_name='中奖商品ID')),
                ('dingdan_id', models.CharField(blank=True, db_index=True, default='', max_length=32, verbose_name='中奖后生成的订单号')),
                ('CreateTime', models.DateTimeField(auto_now_add=True)),
                ('UpdateTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': '转盘抽奖机会',
                'verbose_name_plural': '转盘抽奖机会',
                'db_table': 'zhuanpan_jihui',
            },
        ),
        migrations.AddIndex(
            model_name='zhuanpanhuodong',
            index=models.Index(fields=['club_id', 'qiyong'], name='zhuanpan_hu_club_id_qiyong_idx'),
        ),
        migrations.AddIndex(
            model_name='zhuanpanjiangpin',
            index=models.Index(fields=['huodong_id', 'paixu'], name='zhuanpan_ji_huodong_paixu_idx'),
        ),
        migrations.AddIndex(
            model_name='zhuanpanjihui',
            index=models.Index(fields=['club_id', 'yonghuid', 'zhuangtai'], name='zhuanpan_ji_club_yonghu_zt_idx'),
        ),
    ]
