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

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 java.math.BigDecimal;

/**
 * @author caozehui
 * @data 2024/11/18
 */
@Data
public class ScriptParam {

    @ApiModelProperty("检测脚本id")
    @NotBlank(message = DetectionValidMessage.ID_FORMAT_ERROR)
    private String scriptId;

    @ApiModelProperty("检测脚本类型")
    private String scriptType;

    @ApiModelProperty("检测脚本序号")
    private Integer index;

    @ApiModelProperty("是否启用脚本(状态：0-不启用 1-启用)")
    private Integer enable;

    @Data
    public static class Desc{

        @ApiModelProperty("检测脚本id")
        @NotBlank(message = DetectionValidMessage.ID_FORMAT_ERROR)
        private String scriptId;

        @ApiModelProperty("检测脚本序号")
        @NotNull(message = "检测脚本序号错误，请检查参数是否为空")
        private Integer index;

        @ApiModelProperty("额定电压")
        private BigDecimal devVolt;

        @ApiModelProperty("额定电流")
        private BigDecimal devCurr;

    }
}
