# Generated by Django 2.1.7 on 2020-11-16 08:03

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0068_auto_20201106_1734'),
        ('sales', '0080_auto_20201116_0741'),
        ('product', '0011_product_barcode'),
        ('inventory', '0059_auto_20201114_1138'),
    ]

    operations = [
        migrations.CreateModel(
            name='BoxBottleSubstitute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(blank=True, db_index=True, null=True, verbose_name='族系')),
                ('vtype_id', models.SmallIntegerField(db_index=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_bottle', models.CharField(db_index=True, max_length=20, verbose_name='瓶标号码')),
                ('label_box', models.CharField(db_index=True, max_length=20, verbose_name='箱标号码')),
                ('val', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True, 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='时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='boxsubstitute_company', to='company.Company', verbose_name='公司名称')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='boxsubstitute_product', to='product.Product', verbose_name='产品名称')),
                ('rebate_batch', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='boxsubstitute_rbt_batch', to='sales.ChannelRebateBatch', verbose_name='层级返利Batch')),
                ('rebate_batch_old', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='boxsubstitute_rbt_batcho', to='sales.ChannelRebateBatch', verbose_name='原层级返利Batch')),
                ('stk_batch', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='boxsubstitute_stk_batch', to='inventory.Batch', verbose_name='扫码枪Batch')),
                ('stk_batch_old', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='boxsubstitute_inv_batcho', to='inventory.Batch', verbose_name='原扫码枪Batch')),
            ],
            options={
                'verbose_name': '被箱标置换的瓶标明细',
                'verbose_name_plural': '被箱标置换的瓶标明细',
            },
        ),
    ]
