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;
import java.util.List;

/**
 * <p>
 * 设备故障日志
 * </p>
 *
 * @author 谭斌
 * @since 2024-01-08
 */
public class DeviceFaultLogDto {

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

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

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

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

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

        @ApiModelProperty(value = "事件发生时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime eventTime;

        @ApiModelProperty(value = "创建时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime createTime;


    }

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

        @ApiModelProperty(value = "ID")
        private DeviceEventMsgDto.Vo deviceEventMsg;

        @ApiModelProperty(value = "配置信息")
        List<DeviceFaultMonitorConfigDto.Vo> configList;


    }

}
