package com.xy.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xy.utils.PageBean;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 设备故障监控配置
 * </p>
 *
 * @author 谭斌
 * @since 2024-01-08
 */
public class DeviceFaultMonitorConfigDto {

    @Data
    @Accessors(chain = true)
    public static class SelectList extends Vo {

    }

    @Data
    @Accessors(chain = true)
    public static class Page extends Vo {

        @ApiModelProperty(value = "分页对象", required = true)
        private PageBean page;

    }

    @Data
    @Accessors(chain = true)
    public static class Save extends Vo {

    }

    @Data
    @Accessors(chain = true)
    public static class Update extends Vo {

    }

    @Data
    @Accessors(chain = true)
    public static class Vo {

        @ApiModelProperty(value = "ID")
        private Long monitorId;

        @ApiModelProperty(value = "事件编码")
        private String eventCode;

        @ApiModelProperty(value = "配置描述")
        private String configName;

        @ApiModelProperty(value = "是否已启用")
        private Boolean state;

        @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;

        @ApiModelProperty(value = "条件2：达到m次")
        private Integer eventNum;

        @ApiModelProperty(value = "条件1：最近n分钟")
        private Long minuteNum;

        @ApiModelProperty(value = "故障级别-字典：device_fault_level")
        private Integer faultLevel;

        @ApiModelProperty(value = "是否转售后")
        private Boolean toAfterSale;
    }

}
