# Generated by Django 3.1.4 on 2023-05-26 08:09

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


class Migration(migrations.Migration):

    dependencies = [
        ('sales', '0323_auto_20230506_1516'),
    ]

    operations = [
        migrations.AddField(
            model_name='channelpromotions',
            name='in_lotteryseeds',
            field=models.SmallIntegerField(blank=True, default=0, null=True),
        ),
        migrations.AddField(
            model_name='lotteryseeds',
            name='promotion',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='sales.channelpromotions', verbose_name='渠道返利活动'),
        ),
        migrations.AlterField(
            model_name='channelpromotions',
            name='scan_type',
            field=models.SmallIntegerField(blank=True, choices=[(1, '层级扫码'), (2, '消费者扫码'), (3, '系统触发'), (4, '定制触发')], default=1, null=True, verbose_name='活动扫码类型'),
        ),
        migrations.CreateModel(
            name='CustomizeRebate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('trigger_lv', models.SmallIntegerField(choices=[(2, '二级经销商'), (3, '三级(终端)扫码'), (10, '消费者扫码')], default=2, verbose_name='扫码层级')),
                ('scan_type', models.SmallIntegerField(choices=[(1, '入库'), (2, '出库'), (0, '消费者扫码')], default=2, verbose_name='扫码类别')),
                ('target_lv', models.SmallIntegerField(choices=[(1, '一级经销商'), (2, '二级经销商'), (3, '三级经销商(终端)')], default=2, verbose_name='返利对像层级')),
                ('val', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利金额（点值）')),
                ('promotion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customizerebate_promotion', to='sales.channelpromotions', verbose_name='渠道促销活动')),
            ],
            options={
                'verbose_name': '渠道定制返利',
                'verbose_name_plural': '渠道定制返',
                'unique_together': {('promotion', 'trigger_lv', 'target_lv')},
            },
        ),
    ]
