# Generated by Django 2.1.7 on 2020-09-08 17:19

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


class Migration(migrations.Migration):

    dependencies = [
        ('inventory', '0045_auto_20200901_1856'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('company', '0063_company_lng_lat'),
        ('sales', '0045_auto_20200908_1458'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChannelRebateBatch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tm_checked', models.DateTimeField(blank=True, null=True, verbose_name='检查时间')),
                ('tm_approved', models.DateTimeField(blank=True, null=True, verbose_name='批准时间')),
                ('val', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利总金额（点值）')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('dt', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='创建日期')),
                ('tm_redeemed', models.DateTimeField(blank=True, null=True, verbose_name='兑付时间')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('approved', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='channelrebatebatch_approved', to=settings.AUTH_USER_MODEL, verbose_name='批准人')),
                ('batch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Batch', verbose_name='batch')),
                ('checked', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='channelrebatebatch_checked', to=settings.AUTH_USER_MODEL, verbose_name='检查人')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelrebatebath_company', to='company.Company', verbose_name='公司名称')),
                ('promotion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelrebatebatch_promotion', to='sales.ChannelPromotions', verbose_name='渠道促销活动')),
            ],
            options={
                'verbose_name': '营销渠道批次返利',
                'verbose_name_plural': '营销渠道批次返利',
            },
        ),
        migrations.CreateModel(
            name='ChannelRebateRedeemed',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('val', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利总金额（点值）')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='兑付时间')),
                ('dt', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='兑付日期')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='channelrebateredeemed_company', to='company.Company', verbose_name='公司名称')),
                ('rebatebatch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.ChannelRebateBatch', verbose_name='营销渠道返利批次')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='channelrebateredeemed_user', to=settings.AUTH_USER_MODEL, verbose_name='操作人')),
            ],
            options={
                'verbose_name': '营销渠道返利兑付',
                'verbose_name_plural': '营销渠道返利兑付',
            },
        ),
        migrations.AlterField(
            model_name='channerebatedetails',
            name='lv_val',
            field=models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利金额（点值）'),
        ),
    ]
