package com.njcn.gather.system.cfg.pojo.param;

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

import javax.validation.constraints.*;

/**
 * @author caozehui
 * @data 2024/11/16
 */
@Data
public class SysTestConfigParam {

    @ApiModelProperty(value = "检测报告是否自动生成0 否；1是")
    @Min(value = 0, message = SystemValidMessage.AUTO_GENERATE_FORMAT_ERROR)
    @Max(value = 1, message = SystemValidMessage.AUTO_GENERATE_FORMAT_ERROR)
    private Integer autoGenerate;

    @ApiModelProperty(value = "最大检测次数")
    private Integer maxTime;

    @ApiModelProperty(value = "数据精度")
    private Integer scale;

    @ApiModelProperty(value = "场景")
    private String scene;

    @ApiModelProperty(value = "比对监测后，当电压、电流不符合时，是否对标准设备进行系数校准")
    private Integer coefficient;

    @Data
    public static class UpdateParam extends SysTestConfigParam {
        @ApiModelProperty("id")
        @Pattern(regexp = PatternRegex.SYSTEM_ID, message = SystemValidMessage.ID_FORMAT_ERROR)
        private String id;
    }
}
