package com.njcn.product.terminal.mysqlTerminal.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author denghuajun
 * @version 1.0.0
 * @date 2022年05月06日 15:38
 */
@Data
public class LineDetailVO implements Serializable {

    @ApiModelProperty("供电公司名称")
    private String gdName;

    @ApiModelProperty("变电站名称")
    private String subName;

    @ApiModelProperty("终端名称")
    private String devName;

    @ApiModelProperty("网络参数")
    private String ip;

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

    @ApiModelProperty("母线名称")
    private String volName;

    /**
     * （0：运行；1：检修；2：停运；3：调试；4：退运）
     */
    @ApiModelProperty("监测点运行状态")
    private Integer runFlag;
    @Data
    public static class Detail extends LineDetailVO implements Serializable{

        @ApiModelProperty("区域id")
        private String areaId;

        @ApiModelProperty("区域名称")
        private String areaName;

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

        @ApiModelProperty("监测点Id")
        private String lineId;

        @ApiModelProperty("测量间隔（1-10分钟）")
        private Integer timeInterval;

        @ApiModelProperty("接线类型")
        private Integer ptType;

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

        @ApiModelProperty("数据更新时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime timeID;

        @ApiModelProperty("终端等级")
        private String lineGrade;

        @ApiModelProperty("通讯状态（0：中断；1：正常）")
        private Integer comFlag;

        @ApiModelProperty("PT一次变比")
        private Double PT1;

        @ApiModelProperty("PT二次变比")
        private Double PT2;

        @ApiModelProperty("CT一次变比")
        private Double CT1;

        @ApiModelProperty("CT二次变比")
        private Double CT2;

        @ApiModelProperty("套餐流量")
        private Float flowMeal;

        @ApiModelProperty("已用流量")
        private Float statisValue;

        @ApiModelProperty("已用流量占比")
        private Float flowProportion;
    }

    @Data
    public static class noDataLineInfo extends LineDetailVO implements Serializable{

        @ApiModelProperty("监测点Id")
        private String lineId;

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

        @ApiModelProperty("最新数据时间")
        private LocalDateTime updateTime;
    }
}
