# Generated by Django 3.1.4 on 2023-04-28 16:17

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0323_auto_20230304_1014'),
        ('sales', '0319_auto_20230324_1432'),
    ]

    operations = [
        migrations.AddField(
            model_name='consumerwinner',
            name='promotion',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='consumerwinner_promotion', to='sales.channelpromotions', verbose_name='渠道促销活动'),
        ),
        migrations.AddField(
            model_name='labelscan',
            name='promotion',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='labelscan_promotion', to='sales.channelpromotions', verbose_name='渠道促销活动'),
        ),
        migrations.CreateModel(
            name='ChannelPromotionAccumulations',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label_pkg', models.SmallIntegerField(choices=[(1, '瓶'), (2, '盒'), (3, '箱')], default=1, verbose_name='计数单位')),
                ('per_basis', models.IntegerField(blank=True, null=True, verbose_name='扫码基数')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利')),
                ('remark', models.CharField(blank=True, max_length=30, null=True, verbose_name='备注')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('awardcategory', models.ForeignKey(default=5, on_delete=django.db.models.deletion.CASCADE, related_name='channelpromotionaccumulatins_awardcategory', to='sales.awardcategory', verbose_name='奖励方式')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelpromotionaccumulatins_company', to='company.company', verbose_name='公司名称')),
                ('promotion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelpromotionaccumulatins_promotion', to='sales.channelpromotions', verbose_name='渠道促销方案')),
            ],
            options={
                'verbose_name': '消费者累计扫码返利',
                'verbose_name_plural': '钱包金额',
            },
        ),
    ]
