package com.securitycontrol.entity.background.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

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

/**
 * @author：cwchen
 * @date：2024-04-02-16:54
 * @version：1.0
 * @description：边带设备详情-vo
 */
@Data
public class DeviceBdDetailVo {

    @ApiModelProperty("ID")
    private String id;

    @ApiModelProperty("设备id")
    @NotBlank(message = "设备ID不能为空", groups = {Query.class})
    @Length(max = 50, message = "设备ID字符长度不能超过50", groups = {Query.class})
    private String deviceId;

    @ApiModelProperty("检测名称")
    @NotBlank(message = "检测名称不能为空", groups = {Query.class})
    @Length(max = 50, message = "检测名称字符长度不能超过50", groups = {Query.class})
    private String modeName;

    @ApiModelProperty("最大阈值")
    @Length(max = 50, message = "最大阈值字符长度不能超过50", groups = {Query.class})
    @Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "最大阈值为大于0的数字",groups = {SignProVo.Query.class})
    private String maxValueData;

    @ApiModelProperty("最小阈值")
    @Length(max = 50, message = "最小阈值长字符度不能超过50", groups = {Query.class})
    @Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "最小阈值为大于0的数字",groups = {SignProVo.Query.class})
    private String minValueData;

    @ApiModelProperty("采集值类型")
    @Length(max = 50, message = "采集值类型字符长度不能超过50", groups = {Query.class})
    private String dataType;

    @ApiModelProperty("设备级联编码")
    @Length(max = 50, message = "检设备级联编码字符长度不能超过50", groups = {Query.class})
    private String deviceCode;

    @ApiModelProperty("采集数据单位")
    @NotBlank(message = "采集数据单位不能为空", groups = {Query.class})
    @Length(max = 255, message = "采集数据单位字符长度不能超过50", groups = {Query.class})
    private String unit;

    @ApiModelProperty("1.新增 2.修改")
    private int type;

    /**
     * 查询条件限制
     */
    public interface Query {
    }
}
