package com.njcn.gather.tool.parsepqdif.pojo.vo;

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

import java.util.List;

@Data
@ApiModel("PQDIF二次解析结果")
public class PqdifRecognizeResultVO {

    @ApiModelProperty("状态：SUCCESS / FAILED")
    private String status;

    @ApiModelProperty("提示信息")
    private String message;

    @ApiModelProperty("Observation数量")
    private Long observationCount;

    @ApiModelProperty("Channel数量")
    private Long channelCount;

    @ApiModelProperty("Series数量")
    private Long seriesCount;

    @ApiModelProperty("可识别Observation列表")
    private List<RecognizedObservationVO> observations;

    @ApiModelProperty("未识别字段列表")
    private List<UnknownItemVO> unknownItems;

    @Data
    public static class RecognizedObservationVO {
        private Long recordIndex;
        private String name;
        private String startTime;
        private List<RecognizedChannelVO> channels;
    }

    @Data
    public static class RecognizedChannelVO {
        private Long channelIndex;
        private String name;
        private String phaseCode;
        private String phaseName;
        private String measurementName;
        private Long phaseId;
        private Long quantityMeasuredId;
        private String quantityTypeGuid;
        private List<RecognizedSeriesVO> series;
    }

    @Data
    public static class RecognizedSeriesVO {
        private Long seriesIndex;
        private String unitName;
        private String characteristicName;
        private String valueTypeName;
        private String dataTypeName;
        private Long quantityUnitsId;
        private String quantityCharacteristicGuid;
        private String valueTypeGuid;
        private Long seriesBaseType;
        private Double scale;
        private Double offset;
        private String dataStatus;
        private String dataMessage;
        private Integer valueCount;
        private List<Double> firstValues;
    }

    @Data
    public static class UnknownItemVO {
        private String path;
        private String fieldName;
        private String fieldValue;
        private String message;
    }
}
