package com.njcn.gather.err.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.gather.pojo.constant.DetectionValidMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author caozehui
 * @data 2024-11-21
 */
@Data
public class PqErrSysDtlsParam {

    @ApiModelProperty(value = "误差项类型", required = true)
    @NotBlank(message = DetectionValidMessage.ERR_SYS_DTLS_ERROR_TYPE_NOT_BLANK)
    @Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.ERR_SYS_DTLS_ERROR_TYPE_FORMAT_ERROR)
    private String errorType;

    @ApiModelProperty(value = "脚本项类型", required = true)
    @NotBlank(message = DetectionValidMessage.ERR_SYS_DTLS_SCRIPT_TYPE_NOT_BLANK)
    @Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.ERR_SYS_DTLS_SCRIPT_TYPE_FORMAT_ERROR)
    private String scriptType;

    @ApiModelProperty(value = "误差判断起始值", required = true)
    private Double startValue;

    @ApiModelProperty(value = "是否包含起始值", required = true)
    private Integer startFlag;

    @ApiModelProperty(value = "误差判断结束值", required = true)
    private Double endValue;

    @ApiModelProperty(value = "是否包含结束值", required = true)
    private Integer endFlag;

    @ApiModelProperty(value = "判断条件值类型", required = true)
    private Integer conditionType;

    @ApiModelProperty(value = "最大值误差", required = true)
    @NotNull(message = DetectionValidMessage.MAX_ERROR_VALUE_NOT_NULL)
    private Double maxErrorValue;

    @ApiModelProperty(value = "误差值类型", required = true)
    @NotNull(message = DetectionValidMessage.ERROR_VALUE_TYPE_NOT_BLANK)
    private Integer errorValueType;

    @ApiModelProperty("排序")
    @NotNull(message = DetectionValidMessage.SORT_NOT_NULL)
    private Integer sort;

    @ApiModelProperty("1绝对值、2相对值")
    private Integer valueType;

    @ApiModelProperty("误差单位")
    private String errorUnit;

}
