# Generated by Django 3.2.9 on 2022-01-04 08:41

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


class Migration(migrations.Migration):

    dependencies = [
        ('mtm', '0042_alter_recordformfield_field_type'),
        ('wpm', '0043_auto_20211231_1130'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='operation',
            name='use_scrap',
        ),
        migrations.AddField(
            model_name='operationmaterial',
            name='from_batch',
            field=models.CharField(blank=True, max_length=100, null=True, verbose_name='源批次'),
        ),
        migrations.AddField(
            model_name='operationmaterial',
            name='from_material',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='om_fmaterial', to='mtm.material', verbose_name='源物料'),
        ),
        migrations.AddField(
            model_name='operationmaterial',
            name='use_scrap',
            field=models.BooleanField(default=False, verbose_name='是否使用的边角料'),
        ),
        migrations.AddField(
            model_name='operationwproduct',
            name='ng_sign',
            field=models.PositiveSmallIntegerField(blank=True, choices=[(10, '返工'), (20, '返修'), (30, '报废'), (40, '让步接收'), (50, '偏离许可'), (60, '降级使用'), (70, '退回供方'), (80, '召回')], null=True, verbose_name='当时的不合格标记'),
        ),
        migrations.AddField(
            model_name='wproduct',
            name='coperation',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='wp_coperation', to='wpm.operation', verbose_name='创建所关联操作'),
        ),
        migrations.AddField(
            model_name='wproductflow',
            name='coperation',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='wpf_coperation', to='wpm.operation', verbose_name='创建所关联操作'),
        ),
        migrations.AlterField(
            model_name='operationmaterial',
            name='material',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='om_material', to='mtm.material', verbose_name='可能产出的产品'),
        ),
        migrations.AlterField(
            model_name='wproductflow',
            name='operation',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='wpf_operation', to='wpm.operation', verbose_name='当前操作'),
        ),
    ]
