package com.njcn.mq.message;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * cld设备更新台账实体
 * @author xy
 */
@Data
public class CldUpdateLedgerMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("消息唯一标识")
    private String guid;

    @ApiModelProperty("add_terminal/delete_terminal/ledger_modify")
    private String code;

    @ApiModelProperty("进程号")
    private Integer processNo;

    @ApiModelProperty("数据")
    private List<CldDeviceDto> data;

    @Data
    public static class CldDeviceDto implements Serializable {

        @ApiModelProperty("最大进程数")
        private Integer maxProcessNum;

        @ApiModelProperty("进程号")
        private Integer node;

        @ApiModelProperty("设备id")
        private String id;

        @ApiModelProperty("设备MAC")
        private String ip;

        @ApiModelProperty("设备型号")
        private String devType;

        @ApiModelProperty("设备名称")
        private String name;

        @ApiModelProperty("监测点信息集合")
        private List<CldMonitorDto> monitorData;
    }

    @Data
    public static class CldMonitorDto implements Serializable {

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

        @ApiModelProperty("监测点名称")
        private String name;

        @ApiModelProperty("监测点线路号")
        private String lineNo;

        @ApiModelProperty("电压等级")
        private String voltageLevel;

        @ApiModelProperty("status")
        private Integer status;

        @ApiModelProperty("接线方式")
        private String ptType;

        @ApiModelProperty("设备id")
        private String deviceId;

        @ApiModelProperty("pt一次变比")
        private Double pt1;

        @ApiModelProperty("pt二次变比")
        private Double pt2;

        @ApiModelProperty("ct一次变比")
        private Double ct1;

        @ApiModelProperty("ct二次变比")
        private Double ct2;
    }


}
