# Generated by Django 3.1.4 on 2022-05-18 11:05

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0033_product_processflow'),
        ('company', '0291_auto_20220511_1026'),
        ('inventory', '0140_auto_20220518_0759'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProductDifBatch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty_tt', models.IntegerField(verbose_name='总记录数')),
                ('qty_dif', models.IntegerField(verbose_name='差异记录数')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='生成日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='生成时间')),
                ('mended', models.BooleanField(default=False, verbose_name='是否已更正')),
                ('tm_mended', models.DateTimeField(blank=True, null=True, verbose_name='更正时间')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('batch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='productdifbatch_batch', to='inventory.batch', verbose_name='物流batch')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='productdifbatch_company', to='company.company', verbose_name='企业名称')),
            ],
            options={
                'verbose_name': '产品名称差异batch',
                'verbose_name_plural': '产品名称差异batch',
            },
        ),
        migrations.CreateModel(
            name='ProductDifDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vtype_id', models.SmallIntegerField(verbose_name='单据类型')),
                ('label_code', models.CharField(max_length=20, verbose_name='标签号码')),
                ('label_pk_id', models.BigIntegerField(blank=True, null=True, verbose_name='主箱标ID')),
                ('label_id', models.BigIntegerField(blank=True, null=True, verbose_name='箱标ID')),
                ('label_pkg', models.SmallIntegerField(blank=True, null=True, verbose_name='标签类型')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='生成时间')),
                ('batch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='prductdifdetails_batch', to='inventory.productdifbatch', verbose_name='差异批次')),
                ('batch_inbound', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='prductdifdetails_product_batch', to='inventory.batch', verbose_name='入库BATCH')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='prductdifdetails_product', to='product.product', verbose_name='当前产品名称')),
                ('product_inbound', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='prductdifdetails_product_inbound', to='product.product', verbose_name='入库产品名称')),
            ],
            options={
                'verbose_name': '产品名称差异明细',
                'verbose_name_plural': '产品名称差异明细',
            },
        ),
    ]
