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 DeviceFaultInfoDto {

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

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @ApiModelProperty(value = "日志截取开始时间-起")
        private LocalDateTime beginCreateTime;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @ApiModelProperty(value = "日志截取开始时间-始")
        private LocalDateTime endCreateTime;

    }

    @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 CountByDeviceVO {
        @ApiModelProperty(value = "事件编码")
        private String eventCode;
        @ApiModelProperty(value = "事件名称")
        private String eventName;
        @ApiModelProperty(value = "待解决数量")
        private String todoNum;
        @ApiModelProperty(value = "已解决数量")
        private String doneNum;
    }

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

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

        @ApiModelProperty(value = "商户ID")
        private Long mercId;

        @ApiModelProperty(value = "商户名称")
        private String mercName;

        @ApiModelProperty(value = "设备编号")
        private Long deviceId;

        @ApiModelProperty(value = "故障描述")
        private String describes;

        @ApiModelProperty(value = "故障说明")
        private String msg;

        @ApiModelProperty(value = "建议")
        private String propose;

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

        @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 = "标记解决时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime resolveTime;

        @ApiModelProperty(value = "事件发生次数")
        private Integer eventNum;

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

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

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

    }

}
