# Generated by Django 2.1.7 on 2020-11-07 16:35

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0010_test'),
        ('inventory', '0057_auto_20201107_1626'),
        ('company', '0068_auto_20201106_1734'),
        ('sales', '0070_auto_20201107_1626'),
    ]

    operations = [
        migrations.CreateModel(
            name='RebateSubstitute',
            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_code', models.CharField(db_index=True, max_length=20, verbose_name='瓶标号码')),
                ('label_box', models.CharField(db_index=True, max_length=20, 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.PROTECT, related_name='pkgsubstitute_company', to='company.Company', verbose_name='公司名称')),
                ('company_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='pkgsubstitute_company_to', to='company.Company', verbose_name='收货公司')),
                ('inv_batch', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='inventory.Batch', verbose_name='扫码枪Batch')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='pkgsubstitute_product', to='product.Product', verbose_name='产品名称')),
                ('rbt_batch', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='sales.ChannelRebateBatch', verbose_name='层级返利Batch')),
            ],
            options={
                'verbose_name': '被箱标置换的瓶标明细',
                'verbose_name_plural': '被箱标置换的瓶标明细',
            },
        ),
    ]
