# Generated by Django 2.1.7 on 2020-11-04 19:08

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0010_test'),
        ('company', '0064_agentorderdetails_package'),
        ('inventory', '0055_auto_20201030_1524'),
    ]

    operations = [
        migrations.CreateModel(
            name='PkgSubstitute',
            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='时间')),
                ('batch', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pkgsubstitute_batch', to='inventory.Batch', verbose_name='扫码枪Batch')),
                ('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='收货公司')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='pkgsubstitute_product', to='product.Product', verbose_name='产品名称')),
            ],
            options={
                'verbose_name': '箱标置换瓶标明细',
                'verbose_name_plural': '箱标置换瓶标明细',
            },
        ),
    ]
