# Generated by Django 3.1.4 on 2021-07-01 15:04

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0015_auto_20210428_1433'),
        ('company', '0214_auto_20210625_1151'),
        ('sales', '0206_auto_20210630_1717'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='activityrebate_labelprize',
            name='activity_award',
        ),
        migrations.RemoveField(
            model_name='activityrebate_productaward',
            name='award',
        ),
        migrations.AddField(
            model_name='activityrebate_labelprize',
            name='amount',
            field=models.DecimalField(decimal_places=2, default=0, max_digits=8, verbose_name='金额'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='activityrebate_labelprize',
            name='tm',
            field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='布奖时间'),
        ),
        migrations.AddField(
            model_name='activityrebate_productaward',
            name='name',
            field=models.CharField(blank=True, max_length=100, null=True, verbose_name='对应名称'),
        ),
        migrations.AlterField(
            model_name='activityrebate_labelprize',
            name='activity',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='sales.activities', verbose_name='返利活动'),
        ),
        migrations.AlterField(
            model_name='activityrebate_labelprize',
            name='company_id',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.company', verbose_name='公司'),
        ),
        migrations.AlterField(
            model_name='activityrebate_productaward',
            name='activity',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='sales.activities', verbose_name='返利活动'),
        ),
        migrations.AlterField(
            model_name='activityrebate_productaward',
            name='company_id',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.company', verbose_name='公司'),
        ),
        migrations.AlterField(
            model_name='activityrebate_productaward',
            name='product',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='product.product', verbose_name='产品'),
        ),
        migrations.CreateModel(
            name='ActivityRebate_PrizePlan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fragments', models.IntegerField(blank=True, null=True, verbose_name='分配为几份')),
                ('tm', models.DateTimeField(auto_now_add=True, null=True, verbose_name='计划添加时间')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='金额')),
                ('is_active', models.BooleanField(default=False, verbose_name='是否开启')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='remark')),
                ('activity', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='sales.activities', verbose_name='返利活动')),
                ('company_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.company', verbose_name='公司')),
                ('product', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='product.product', verbose_name='产品')),
            ],
            options={
                'verbose_name': '活动的标签布奖表',
                'verbose_name_plural': '活动的标签布奖表',
            },
        ),
    ]
