# Generated by Django 2.1.7 on 2020-12-19 08:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0098_companycfg_terminal_register_automatic_approve'),
    ]

    operations = [
        migrations.CreateModel(
            name='Benefit_Rule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=50, verbose_name='权益名称')),
                ('discount', models.DecimalField(blank=True, decimal_places=2, default=100, max_digits=10, null=True, verbose_name='折扣')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('tm', models.DateTimeField(auto_now_add=True, null=True, verbose_name='时间')),
                ('benefit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Benefit', verbose_name='权益')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Company', verbose_name='公司')),
            ],
            options={
                'verbose_name': '权益规则',
                'verbose_name_plural': '权益规则',
            },
        ),
        migrations.CreateModel(
            name='Benefit_Rule_Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=50, verbose_name='权益类型名称')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
            ],
            options={
                'verbose_name': '权益类型',
                'verbose_name_plural': '权益类型',
            },
        ),
        migrations.AddField(
            model_name='benefit_rule',
            name='rule_category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='company.Benefit_Rule_Category', verbose_name='权益类型'),
        ),
    ]
