package com.xy.dto; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.experimental.Accessors; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; import java.util.List; /** *

* 设备配置表 *

* * @author lijin * @since 2023-06-16 */ public class DeviceConfigDto { @Data @Accessors(chain = true) public static class Update { @NotNull(message = "deviceId不能为空") @ApiModelProperty(value = "设备id") private Long deviceId; @NotNull(message = "最大温度告警值不能为空") @ApiModelProperty(value = "最大温度告警值") private Integer tempMax; @NotNull(message = "最小温度告警值不能为空") @ApiModelProperty(value = "最小温度告警值") private Integer tempMin; } @Data @Accessors(chain = true) public static class BatchUpdate { @NotEmpty(message = "deviceId不能为空") @ApiModelProperty(value = "设备id") private List deviceIds; @NotNull(message = "最大温度告警值不能为空") @ApiModelProperty(value = "最大温度告警值") private Integer tempMax; @NotNull(message = "最小温度告警值不能为空") @ApiModelProperty(value = "最小温度告警值") private Integer tempMin; } @Data @Accessors(chain = true) public static class Obj { @NotNull(message = "deviceId不能为空") @ApiModelProperty(value = "设备id") private Long deviceId; } @Data @Accessors(chain = true) public static class Vo { @ApiModelProperty(value = "设备id") private Long deviceId; @ApiModelProperty(value = "最大温度告警值") private Integer tempMax; @ApiModelProperty(value = "最小温度告警值") private Integer tempMin; @ApiModelProperty(value = "创建时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; @ApiModelProperty(value = "更新时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updateTime; } }