package com.njcn.csharmonic.pojo.vo;


import com.njcn.csharmonic.pojo.po.CsAlarmData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author xy
 */
@Data
public class AlarmVO implements Serializable {

    @ApiModelProperty(value = "事件id")
    private String eventId;

    @ApiModelProperty(value = "时间")
    private String date;

    @ApiModelProperty(value = "告警设备台数")
    private Integer warnNums;

    @ApiModelProperty(value = "在线率是否告警")
    private Boolean onlineRateIsWarn;

    @ApiModelProperty(value = "完整性是否告警")
    private Boolean integrityIsWarn;

    @ApiModelProperty(value = "终端告警次数")
    private Integer warnCounts;

    @ApiModelProperty(value = "告警设备id集合")
    private List<String> devIds;

    @ApiModelProperty(value = "是否读取 0:未读取 1:读取")
    private Integer isRead;

    @Data
    public static class AlarmDetail implements Serializable {

        @ApiModelProperty(value = "工程名称")
        private String engineeringName;

        @ApiModelProperty(value = "项目名称")
        private String projectName;

        @ApiModelProperty(value = "设备名称")
        private String devName;

        @ApiModelProperty(value = "设备类型")
        private String devType;

        @ApiModelProperty(value = "告警次数")
        private Integer warnCounts = 0;

        @ApiModelProperty(value = "告警详情")
        private List<WarnDetail> warnDetails = new ArrayList<>();

        @ApiModelProperty(value = "在线率、完整性详情")
        private CsAlarmData dataDetails;

        @Data
        public static class WarnDetail implements Serializable {

            @ApiModelProperty(value = "告警事件时间")
            private String warnEventTime;

            @ApiModelProperty(value = "告警事件描述")
            private String warnEventDesc;
        }

    }


}
