# Generated by Django 3.1.4 on 2023-06-03 08:06

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0040_series_banner'),
        ('company', '0324_companycfg_terminal_level_id'),
        ('sales', '0334_auto_20230602_1657'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='activityawards',
            name='terminal_scan_amt',
        ),
        migrations.CreateModel(
            name='PromotionSeeds',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label_code', models.CharField(db_index=True, max_length=20, verbose_name='标签号码')),
                ('label_pkg', models.SmallIntegerField(blank=True, db_index=True, null=True, verbose_name='标签类型')),
                ('label_id', models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name='标签ID')),
                ('label_pk_id', models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name='标签PKID')),
                ('batch_no', models.CharField(blank=True, max_length=50, null=True, verbose_name='批次号')),
                ('batch_id', models.IntegerField(blank=True, null=True, verbose_name='批次ID')),
                ('terminal_rebate', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True, verbose_name='终端返利')),
                ('agent_rebate', models.DecimalField(blank=True, decimal_places=2, max_digits=12, 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='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('award', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='promotionseeds_award', to='sales.award', verbose_name='奖品名称')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='promotionseeds_company', to='company.company', verbose_name='公司名称')),
                ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='promotionseedss_product', to='product.product', verbose_name='产品名称')),
                ('promotion', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='promotionseeds_promotion', to='sales.channelpromotions', verbose_name='渠道返利活动')),
            ],
            options={
                'verbose_name': '渠道扫码布奖记录',
                'verbose_name_plural': '渠道扫码布奖记录',
                'unique_together': {('company', 'label_code')},
            },
        ),
    ]
