package com.njcn.device.pq.pojo.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.njcn.influx.utils.InstantDateSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @author denghuajun
 * @date 2022/2/28
 *
 */
@Data
public class CommunicateVO implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 更新时间
     */
    private List<String> updateTime = new ArrayList<>();

    /**
     * 事件类型(0：中断；1：正常；2：退出)
     */
    private List<Integer> type = new ArrayList<>();

    /**
     * 冀北分布式光伏概览通讯状态统计（专用）
     */
    @Data
    public static class PVCommunicateVO{

        @ApiModelProperty("监测id")
        private String id;

        @ApiModelProperty("终端id")
        private String devId;

        @ApiModelProperty("类型")
        private Integer type;

        @JsonSerialize(using = InstantDateSerializer.class)
        @ApiModelProperty("发生时间")
        private Instant time;

        @ApiModelProperty("描述")
        private String remark;

        @ApiModelProperty("终端ip：(终端名称_ip)")
        private String devIp;
    }
}
