# Generated by Django 2.1.7 on 2020-10-29 13:52

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


class Migration(migrations.Migration):

    dependencies = [
        ('inventory', '0054_batchdetails_product_id'),
        ('sales', '0063_auto_20201013_2102'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChannelRebateDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vtype_id', models.SmallIntegerField(blank=True, db_index=True, null=True, verbose_name='单据类别ID')),
                ('label_id', models.BigIntegerField(db_index=True, verbose_name='标签ID')),
                ('label_pk_id', models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name='标签PKID')),
                ('label_code', models.CharField(db_index=True, max_length=20, verbose_name='标签号码')),
                ('label_pkg', models.SmallIntegerField(db_index=True, verbose_name='标签类型')),
                ('val', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='返利金额（点值）')),
                ('dt', models.DateField(db_index=True, default=django.utils.timezone.now, verbose_name='日期')),
                ('tm', models.DateTimeField(default=django.utils.timezone.now, verbose_name='时间')),
            ],
            options={
                'verbose_name': '渠道返利明细',
                'verbose_name_plural': '渠道返利明细',
            },
        ),
        migrations.AlterModelOptions(
            name='channelrebatebatch',
            options={'verbose_name': '渠道返利批次', 'verbose_name_plural': '渠道返利批次'},
        ),
        migrations.AddField(
            model_name='channelrebatedetails',
            name='rebate_batch',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.ChannelRebateBatch', verbose_name='渠道返利批次'),
        ),
        migrations.AddField(
            model_name='channelrebatedetails',
            name='stk_batch',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='inventory.Batch', verbose_name='StkBatch'),
        ),
    ]
