# Generated by Django 3.1.4 on 2021-10-21 13:58

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


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0027_auto_20211012_0751'),
        ('company', '0254_auto_20211014_1321'),
        ('inventory', '0117_stkclosingstkdetails_store_fr_id'),
    ]

    operations = [
        migrations.CreateModel(
            name='StkClosingDetails',
            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_pk_id', models.BigIntegerField(db_index=True, verbose_name='主箱标ID')),
                ('label_pkg', models.SmallIntegerField(db_index=True, verbose_name='标签类型')),
                ('store_id', models.IntegerField(blank=True, db_index=True, null=True, verbose_name='仓库ID')),
                ('qty_tt', models.SmallIntegerField(verbose_name='计数')),
                ('qty_adj', models.SmallIntegerField(verbose_name='调整数量')),
                ('qty_act', models.SmallIntegerField(verbose_name='实际数量')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stkclosingdetails_company', to='company.company', verbose_name='公司')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stkclosingdetails_product', to='product.product', verbose_name='产品')),
                ('stkclosing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stkclosingdetails_period', to='inventory.stkclosingperiod', verbose_name='所属会计期')),
            ],
            options={
                'verbose_name': '库存期结明细',
                'verbose_name_plural': '库存期结明细',
            },
        ),
        migrations.CreateModel(
            name='StkClosingPeriodDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label_code', models.CharField(db_index=True, max_length=20, verbose_name='标签号码')),
                ('label_pk_id', models.BigIntegerField(db_index=True, verbose_name='主箱标ID')),
                ('label_pkg', models.SmallIntegerField(db_index=True, verbose_name='标签类型')),
                ('store_id', models.IntegerField(blank=True, db_index=True, null=True, verbose_name='仓库ID')),
                ('store_fr_id', models.IntegerField(blank=True, db_index=True, null=True, verbose_name='转库来源仓库ID')),
                ('vtype_id', models.SmallIntegerField(blank=True, db_index=True, null=True, verbose_name='单据类型')),
                ('qty_tt', models.SmallIntegerField(verbose_name='计数')),
                ('qty_adj', models.SmallIntegerField(blank=True, null=True, verbose_name='调整数量')),
                ('qty_act', models.SmallIntegerField(blank=True, null=True, verbose_name='实际数量')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stkclosingperioddetails_product', to='product.product', verbose_name='产品')),
                ('stkclosing', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stkclosingperioddetails_period', to='inventory.stkclosingperiod', verbose_name='所属会计期')),
            ],
            options={
                'verbose_name': '期结当期变动明细',
                'verbose_name_plural': '期结当期变动明细',
            },
        ),
        migrations.DeleteModel(
            name='StkClosingStkDetails',
        ),
    ]
