# Generated by Django 2.1.7 on 2020-06-23 16:20

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0043_auto_20200620_0908'),
        ('sales', '0004_auto_20200620_0816'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActivityAwards',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rate', models.SmallIntegerField(verbose_name='中奖概率')),
                ('qty_upper', models.IntegerField(verbose_name='上限数量')),
                ('qty_input', models.IntegerField(verbose_name='投放数量')),
                ('qty_alarm', models.IntegerField(default=0, verbose_name='预警数量')),
            ],
            options={
                'verbose_name': '营销活动奖品',
                'verbose_name_plural': '营销活动奖品',
            },
        ),
        migrations.RemoveField(
            model_name='activityawardsconfig',
            name='activity',
        ),
        migrations.RemoveField(
            model_name='activityawardsconfig',
            name='award',
        ),
        migrations.AddField(
            model_name='activityrebatconfig',
            name='company',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='activityrebat_company', to='company.Company', verbose_name='公司名称'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='awardaddition',
            name='company',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='awardsaddition_company', to='company.Company', verbose_name='公司名称'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='wxofficialaccounts',
            name='ancestor_id',
            field=models.IntegerField(blank=True, null=True, verbose_name='族系'),
        ),
        migrations.AddField(
            model_name='wxofficialaccounts',
            name='company_id',
            field=models.IntegerField(blank=True, null=True, verbose_name='所属公司'),
        ),
        migrations.AlterField(
            model_name='activities',
            name='scheme',
            field=models.SmallIntegerField(blank=True, choices=[(1, '概率'), (2, '奖池')], null=True, verbose_name='布奖方案'),
        ),
        migrations.DeleteModel(
            name='ActivityAwardsConfig',
        ),
        migrations.AddField(
            model_name='activityawards',
            name='activity',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activityawards_activity', to='sales.Activities', verbose_name='营销活动'),
        ),
        migrations.AddField(
            model_name='activityawards',
            name='award',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activityawards_award', to='sales.Award', verbose_name='奖品名称'),
        ),
        migrations.AddField(
            model_name='activityawards',
            name='company',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activityawards_company', to='company.Company', verbose_name='公司名称'),
        ),
    ]
