# Generated by Django 3.2.6 on 2021-10-18 02:57

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


class Migration(migrations.Migration):

    dependencies = [
        ('mtm', '0022_auto_20211014_0944'),
    ]

    operations = [
        migrations.AddField(
            model_name='recordformfield',
            name='high_limit',
            field=models.FloatField(blank=True, null=True, verbose_name='上限值'),
        ),
        migrations.AddField(
            model_name='recordformfield',
            name='high_rule',
            field=models.IntegerField(blank=True, choices=[(1, '小于'), (2, '小于等于')], null=True, verbose_name='上限规则'),
        ),
        migrations.AddField(
            model_name='recordformfield',
            name='low_limit',
            field=models.FloatField(blank=True, null=True, verbose_name='下限值'),
        ),
        migrations.AddField(
            model_name='recordformfield',
            name='low_rule',
            field=models.IntegerField(blank=True, choices=[(1, '大于'), (2, '大于等于')], null=True, verbose_name='下限规则'),
        ),
        migrations.AddField(
            model_name='recordformfield',
            name='need_judge',
            field=models.BooleanField(default=False, verbose_name='需要判定'),
        ),
        migrations.AddField(
            model_name='recordformfield',
            name='rule_expression',
            field=models.JSONField(default=list, help_text='判定表达式, 格式为[{"expression":"{value} > 3 and {value}<10"}] 其中{}用于填充工单的字段key,运算时会换算成实际的值，符合条件返回true,表达式只支持简单的运算或datetime/time运算.以首次匹配成功的条件为准，所以多个条件不要有冲突', verbose_name='判定表达式'),
        ),
        migrations.AlterField(
            model_name='usedstep',
            name='step',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='usedstep', to='mtm.step', verbose_name='子工序'),
        ),
    ]
