# Generated by Django 3.2.6 on 2021-11-08 01:51

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


class Migration(migrations.Migration):

    dependencies = [
        ('mtm', '0028_auto_20211102_1707'),
        ('qm', '0003_testrecord'),
    ]

    operations = [
        migrations.RenameField(
            model_name='testrecord',
            old_name='fifo_detail',
            new_name='fifo_item',
        ),
        migrations.CreateModel(
            name='TestRecordItem',
            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='删除标记')),
                ('field_name', models.CharField(max_length=50, verbose_name='字段名')),
                ('field_key', models.CharField(max_length=50, verbose_name='字段标识')),
                ('field_type', models.IntegerField(choices=[(1, '生产记录'), (2, '检验记录')], verbose_name='字段类型')),
                ('field_value', models.JSONField(blank=True, default=dict, verbose_name='录入值')),
                ('need_judge', models.BooleanField(default=False, verbose_name='是否需要判定')),
                ('is_testok', models.BooleanField(default=True, verbose_name='是否合格')),
                ('form_field', models.ForeignKey(db_constraint=False, on_delete=django.db.models.deletion.CASCADE, to='mtm.recordformfield', verbose_name='关联字段')),
                ('test_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='qm.testrecord', verbose_name='关联的检测记录')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
