package com.njcn.csharmonic.pojo.vo;

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

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

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

    private final static long serialVersionUID = 1L;

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

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

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

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

    @ApiModelProperty("监测点通讯状态 1:离线 2:在线")
    private Integer runStatus;

    @ApiModelProperty("数据时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Instant dataTime;

    @ApiModelProperty("监测点类型 0:治理监测点 1:监测监测点")
    private Integer lineType;

    @ApiModelProperty("指标数据")
    private List<targetDetail> children;

    @Data
    public static class targetDetail implements Serializable {

        @ApiModelProperty("指标id")
        private String targetId;

        @ApiModelProperty("指标名称")
        private String name;

        @ApiModelProperty("指标别名")
        private String otherName;

        @ApiModelProperty("指标别名单位")
        private String otherNameUnit;

        @ApiModelProperty("单位")
        private String unit;

        @ApiModelProperty("相别")
        private String phase;

        @ApiModelProperty("一二次值转换")
        private String primaryFormula;

        @ApiModelProperty("排序")
        private Integer sort;

        @ApiModelProperty("数据")
        private Double data;
    }

}
