# Generated by Django 2.1.7 on 2020-11-23 16:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0071_auto_20201120_1548'),
        ('sales', '0086_rebatepaid_level_id'),
    ]

    operations = [
        migrations.CreateModel(
            name='PromotionCode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=12, unique=True, verbose_name='验证码')),
                ('item', models.IntegerField(verbose_name='对应物品名称')),
                ('printed', models.BooleanField(default=False, verbose_name='是否已印刷')),
                ('status', models.IntegerField(default=0, verbose_name='状态')),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PromotionCode_activity', to='sales.Activities', verbose_name='活动名称')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PromotionCode_company', to='company.Company', verbose_name='公司名称')),
                ('uid', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='PromotionCode_user', to='sales.ConsumerAccount', verbose_name='状态持有人')),
            ],
            options={
                'verbose_name': '活动使用的验证码',
                'verbose_name_plural': '活动使用的验证码',
            },
        ),
        migrations.CreateModel(
            name='PromotionCodeStatusRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('operation', models.IntegerField(default=0, verbose_name='操作')),
                ('tm', models.DateTimeField(default=django.utils.timezone.now, verbose_name='时间')),
                ('code', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PromotionCodeStatusRecord_code', to='sales.PromotionCode', verbose_name='验证码')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PromotionCodeStatusRecord_user', to='sales.ConsumerAccount', verbose_name='操作人')),
            ],
            options={
                'verbose_name': '验证码操作记录',
                'verbose_name_plural': '验证码操作记录',
            },
        ),
    ]
