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

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

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

/**
 * pqs
 *
 * @author cdf
 * @date 2022/3/31
 */
@Data
@ApiModel
public class TerminalLedgerVO implements Serializable {

    @ApiModelProperty(name = "areaIndex",value = "区域索引")
    private String areaIndex;
    @ApiModelProperty(name = "areaName",value = "区域名称")
    private String areaName;
    @ApiModelProperty(name = "list",value = "类型")
    private List<TemData> list;


    @Data
    @ApiModel
    static public class TemData {
        @ApiModelProperty(name = "name",value = "类型名称")
        private String name;
        @ApiModelProperty(name = "list",value = "类型详情")
        private List<ItemData> list;
    }


    @Data
    @ApiModel
    static public class ItemData implements Comparable<ItemData> {
        @ApiModelProperty(name = "lineCount",value = "监测点数量")
        private Integer lineCount = 0;
        @ApiModelProperty(name = "devCount",value = "设备数量")
        private Integer devCount = 0;
        @ApiModelProperty(name = "subCount",value = "变电站数量")
        private Integer subCount = 0;
        @ApiModelProperty(name = "dicIndex",value = "字典索引")
        private String dicIndex;
        @ApiModelProperty(name = "dicName",value = "字典名称")
        private String dicName;
        @ApiModelProperty(name = "voltage",value = "电压等级")
        private Float voltage;

        @Override
        public int compareTo(ItemData data) {
            return (int)(this.voltage - data.voltage);
        }
    }

}
