package com.ho.business.vo.req.deviceModel;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * @author gyan
 * @desc: TODO
 * @DateTime: 2023/3/7 16:49
 */
@Data
public class DeviceCol {

    @ApiModelProperty(value = "id")
    Integer id;

    @ApiModelProperty(value = "设备字段名")
    @NotNull(message = "col字段名称不能为空")
    @Size(min = 1, max = 45, message = "col名称长度不能超过45个字符")
    String col;

    @ApiModelProperty(value = "设备字段中文名")
    @NotNull(message = "字段中文名不能为空")
    @Size(min = 1, max = 45, message = "字段中文名长度不能超过45个字符")
    String colName;


    @ApiModelProperty(value = "是否采集")
    Integer isSave;

    @ApiModelProperty(value = "最大值")
    @Digits(integer=7,fraction = 2,message = "最大值整数位上限为7位，小数位上限为2位")
    BigDecimal maxValue;

    @ApiModelProperty(value = "最小值")
    @Digits(integer=7,fraction = 2,message = "最小值整数位上限为7位，小数位上限为2位")
    BigDecimal minValue;

    @ApiModelProperty(value = "额定值")
    @Digits(integer=7,fraction = 2,message = "额定值整数位上限为7位，小数位上限为2位")
    BigDecimal specifiedValue;

    @ApiModelProperty(value = "偏移量")
    @Digits(integer=7,fraction = 2,message = "偏移量整数位上限为7位，小数位上限为2位")
    BigDecimal offsetValue;

    @ApiModelProperty(value = "系数")
    @Digits(integer=7,fraction = 2,message = "系数最小值整数位上限为7位，小数位上限为2位")
    BigDecimal factor;

    @ApiModelProperty(value = "单位")
    String  unit;

    @ApiModelProperty(value = "1遥信 2遥测")
    Integer sensType;

    @ApiModelProperty(value = " 1展示  0 不展示")
    Integer isShow;
}
