# Generated by Django 3.1.4 on 2021-03-29 19:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0191_auto_20210327_1538'),
        ('inventory', '0094_auto_20210329_1341'),
    ]

    operations = [
        migrations.CreateModel(
            name='StackDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_id', models.IntegerField(blank=True, db_index=True, null=True, verbose_name='产品名称')),
                ('label_pk_id', models.BigIntegerField(blank=True, null=True, verbose_name='主箱标ID')),
                ('label_pkg', models.SmallIntegerField(blank=True, null=True, verbose_name='标签类型')),
                ('label_code', models.CharField(db_index=True, max_length=20, verbose_name='标签号码')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='时间')),
            ],
            options={
                'verbose_name': '垛位现有标签明细',
                'verbose_name_plural': '垛位现有标签明细',
            },
        ),
        migrations.RemoveField(
            model_name='stacklogdetails',
            name='log',
        ),
        migrations.RemoveField(
            model_name='stacklogdetails',
            name='stack',
        ),
        migrations.RemoveField(
            model_name='stacklog',
            name='company',
        ),
        migrations.RemoveField(
            model_name='stacklog',
            name='user',
        ),
        migrations.RemoveField(
            model_name='stacklog',
            name='voucher_id',
        ),
        migrations.RemoveField(
            model_name='stacklog',
            name='voucher_type',
        ),
        migrations.AddField(
            model_name='batchdetails',
            name='stack_id',
            field=models.IntegerField(blank=True, null=True, verbose_name='垛位ID'),
        ),
        migrations.AddField(
            model_name='stack',
            name='product_id',
            field=models.IntegerField(blank=True, db_index=True, null=True, verbose_name='产品名称'),
        ),
        migrations.AddField(
            model_name='stacklog',
            name='batch_id',
            field=models.IntegerField(blank=True, null=True, verbose_name='BatchID'),
        ),
        migrations.AddField(
            model_name='stacklog',
            name='label_code',
            field=models.CharField(db_index=True, default='', max_length=20, verbose_name='标签号码'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='stacklog',
            name='label_pk_id',
            field=models.BigIntegerField(blank=True, null=True, verbose_name='主箱标ID'),
        ),
        migrations.AddField(
            model_name='stacklog',
            name='label_pkg',
            field=models.SmallIntegerField(blank=True, null=True, verbose_name='标签类型'),
        ),
        migrations.AddField(
            model_name='stacklog',
            name='stack',
            field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.DO_NOTHING, related_name='stacklog_stack', to='inventory.stack', verbose_name='垛'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='stacklog',
            name='user_id',
            field=models.IntegerField(default=0, verbose_name='操作员ID'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='stacklog',
            name='vtype_id',
            field=models.SmallIntegerField(blank=True, null=True, verbose_name='单据类型'),
        ),
        migrations.AddField(
            model_name='stkdetails',
            name='stack_id',
            field=models.IntegerField(blank=True, null=True, verbose_name='垛位ID'),
        ),
        migrations.AlterUniqueTogether(
            name='stack',
            unique_together={('company', 'code')},
        ),
        migrations.DeleteModel(
            name='StackLabels',
        ),
        migrations.DeleteModel(
            name='StackLogDetails',
        ),
        migrations.AddField(
            model_name='stackdetails',
            name='stack',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='stackdetails_stack', to='inventory.stack', verbose_name='垛'),
        ),
    ]
