# Generated by Django 3.1.4 on 2021-01-06 10:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0013_product_brand'),
        ('company', '0107_auto_20201230_0952'),
        ('inventory', '0072_auto_20210105_1551'),
    ]

    operations = [
        migrations.CreateModel(
            name='StkClosingBatchDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(db_index=True, verbose_name='企业ID')),
                ('product_id', models.IntegerField(blank=True, null=True, verbose_name='产品id')),
                ('label_code', models.CharField(db_index=True, max_length=20, verbose_name='标签号码')),
                ('label_id', models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name='标签ID')),
                ('label_pk_id', models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name='标签PKID')),
                ('label_pkg', models.SmallIntegerField(blank=True, db_index=True, null=True, verbose_name='标签类型')),
                ('store', models.IntegerField(default=0, verbose_name='仓库ID')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingbatchdetails_company', to='company.company', verbose_name='公司')),
            ],
            options={
                'verbose_name': '库存期结上传明细',
                'verbose_name_plural': '库存期结上传明细',
            },
        ),
        migrations.CreateModel(
            name='StkClosingPeriod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(verbose_name='企业ID')),
                ('yr', models.SmallIntegerField(verbose_name='年')),
                ('mn', models.SmallIntegerField(verbose_name='月')),
                ('dt', models.DateField(auto_now_add=True, verbose_name='日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stk_company', to='company.company', verbose_name='公司名称')),
            ],
        ),
        migrations.CreateModel(
            name='StkClosingStkDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(db_index=True, verbose_name='企业ID')),
                ('label_code', models.CharField(db_index=True, max_length=20, verbose_name='标签号码')),
                ('label_id', models.BigIntegerField(db_index=True, verbose_name='标签ID')),
                ('label_pk_id', models.BigIntegerField(db_index=True, verbose_name='标签PKID')),
                ('label_pkg', models.SmallIntegerField(db_index=True, verbose_name='标签类型')),
                ('store', models.IntegerField(default=0, verbose_name='仓库ID')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingdetails_company', to='company.company', verbose_name='公司')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingdetails_product', to='product.product', verbose_name='产品')),
                ('stkclosing', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingdetails_closing', to='inventory.stkclosingperiod', verbose_name='期结会计期')),
            ],
            options={
                'verbose_name': '库存期结明细',
                'verbose_name_plural': '库存期结明细',
            },
        ),
        migrations.CreateModel(
            name='StkClosingTT',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(db_index=True, verbose_name='企业ID')),
                ('store', models.IntegerField(default=0, verbose_name='仓库ID')),
                ('qty_x', models.IntegerField(verbose_name='箱数')),
                ('qty_h', models.IntegerField(verbose_name='盒数')),
                ('qty_p', models.IntegerField(verbose_name='瓶数')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingtt_company', to='company.company', verbose_name='公司')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingtt_product', to='product.product', verbose_name='产品')),
                ('stkclosing', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingtt_closing', to='inventory.stkclosingperiod', verbose_name='期结会计期')),
            ],
            options={
                'verbose_name': '库存期结汇总',
                'verbose_name_plural': '库存期结汇总',
            },
        ),
        migrations.DeleteModel(
            name='StkClosing',
        ),
        migrations.AddField(
            model_name='stkclosingbatchdetails',
            name='stkclosing',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stkclosingbatchdetails_closing', to='inventory.stkclosingperiod', verbose_name='期结会计期'),
        ),
    ]
