# Generated by Django 3.2.9 on 2021-12-09 08:38

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


class Migration(migrations.Migration):

    dependencies = [
        ('wf', '0017_auto_20211203_1501'),
        ('pm', '0016_auto_20211209_1638'),
        ('mtm', '0041_alter_material_type'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('wpm', '0030_alter_wproduct_act_state'),
    ]

    operations = [
        migrations.AlterField(
            model_name='operationmaterial',
            name='count',
            field=models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='消耗或产出数量'),
        ),
        migrations.AlterField(
            model_name='operationwproduct',
            name='subproduction_plan',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ow_subplan', to='pm.subproductionplan', verbose_name='当前子生产计划'),
        ),
        migrations.AlterField(
            model_name='wproduct',
            name='act_state',
            field=models.IntegerField(choices=[(6, '待复检'), (8, '操作准备中'), (10, '操作进行中'), (20, '待检验'), (26, '待夹层检验'), (30, '已合格'), (40, '已入库'), (50, '不合格'), (60, '待成品检验')], default=0, verbose_name='进行状态'),
        ),
        migrations.CreateModel(
            name='WprouctTicket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('number', models.CharField(blank=True, max_length=50, null=True, verbose_name='物品编号')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='wprouctticket_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('material', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mtm.material', verbose_name='所在物料状态')),
                ('step', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mtm.step', verbose_name='所在步骤')),
                ('subproduction_plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pm.subproductionplan', verbose_name='所在子生产计划')),
                ('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wf.ticket', verbose_name='关联工单')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='wprouctticket_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
                ('wproduct', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='wpm.wproduct', verbose_name='关联产品')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
