# Generated by Django 2.1.7 on 2020-09-08 14:58

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0063_company_lng_lat'),
        ('sales', '0044_auto_20200901_1830'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChanneRebateDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('package_id', models.SmallIntegerField(choices=[(1, '瓶/支（最内层包装）'), (2, '盒'), (3, '箱(最外层包装')], default=1, verbose_name='包装单位')),
                ('lv_val', models.IntegerField(default=0, verbose_name='返利金额（点值）')),
                ('lv_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='rebatedetails_level', to='company.Level', verbose_name='营销层级')),
            ],
            options={
                'verbose_name': '渠道返利明细',
                'verbose_name_plural': '渠道返利明细',
            },
        ),
        migrations.RemoveField(
            model_name='channelpromtionsrebate',
            name='company',
        ),
        migrations.RemoveField(
            model_name='channelpromtionsrebate',
            name='val_lv1',
        ),
        migrations.RemoveField(
            model_name='channelpromtionsrebate',
            name='val_lv2',
        ),
        migrations.RemoveField(
            model_name='channelpromtionsrebate',
            name='val_lv3',
        ),
        migrations.RemoveField(
            model_name='channelpromtionsrebate',
            name='val_lv4',
        ),
        migrations.RemoveField(
            model_name='channelpromtionsrebate',
            name='val_lv5',
        ),
        migrations.AddField(
            model_name='channelpromtionsrebate',
            name='vtype_id',
            field=models.SmallIntegerField(choices=[(0, '不限定'), (1, '扫码入库'), (2, '扫码出库')], default=2, verbose_name='扫码方式'),
        ),
        migrations.AlterField(
            model_name='channelpromtionsrebate',
            name='channel_lv',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelrebate_level', to='company.Level', verbose_name='扫码层级'),
        ),
        migrations.AlterField(
            model_name='channelpromtionsrebate',
            name='package_id',
            field=models.SmallIntegerField(choices=[(0, '不限定 ）'), (1, '瓶/支（最内层包装）'), (2, '盒'), (3, '箱(最外层包装')], default=3, verbose_name='扫码标签类型'),
        ),
        migrations.AddField(
            model_name='channerebatedetails',
            name='rebate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.ChannelPromtionsRebate', verbose_name='渠道返利策略'),
        ),
    ]
