# Generated by Django 2.1.7 on 2020-09-08 19:24

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0063_company_lng_lat'),
        ('sales', '0048_auto_20200908_1857'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChannelPromtionsRebate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vtype_id', models.SmallIntegerField(choices=[(0, '不限定'), (1, '扫码入库'), (2, '扫码出库')], default=2, verbose_name='扫码类别')),
                ('package_scan', models.SmallIntegerField(choices=[(0, '不限定 ）'), (1, '瓶/支(最内层包装)'), (2, '盒'), (3, '箱(最外层包装')], default=3, verbose_name='扫码标签类型')),
                ('rebate_unit', models.SmallIntegerField(choices=[(1, '按瓶/支(最内层包装)奖励'), (3, '按箱(最外层包装)奖励')], default=1, verbose_name='奖励单位')),
                ('val', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利金额（点值）')),
                ('level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelrebate_level', to='company.Level', verbose_name='扫码层级')),
            ],
            options={
                'verbose_name': '渠道促销返利策略',
                'verbose_name_plural': '渠道促销返利策略',
            },
        ),
        migrations.CreateModel(
            name='ParentRebate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('recursion', models.SmallIntegerField(verbose_name='递推次数')),
                ('val', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利金额（点值）')),
                ('level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rebatedetails_level', to='company.Level', verbose_name='营销层级')),
                ('rebate', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.ChannelPromtionsRebate', verbose_name='渠道返利策略')),
            ],
            options={
                'verbose_name': '渠道返利明细',
                'verbose_name_plural': '渠道返利明细',
            },
        ),
        migrations.RemoveField(
            model_name='channelpromotions',
            name='vtype_id',
        ),
        migrations.AddField(
            model_name='channelpromtionsrebate',
            name='promotion',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelrebate_promotion', to='sales.ChannelPromotions', verbose_name='渠道促销活动'),
        ),
    ]
