package cn.wise.sc.energy.power.plant.business.domain;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.util.List;

/**
 * @description:
 * @author: qh
 * @create: 2020-08-24 19:30
 **/
@Data
public class FrequencyQuery {
    /**
     * 开始时间
     */
    @JSONField(name = "StartTime")
    private Long startTime;
    /**
     * 时间间隔
     */
    @JSONField(name = "TimeSpan")
    private Long timeSpan;
    @JSONField(name = "Record")
    private Record record;
    @lombok.Data
    public static class Record {
        @JSONField(name = "Data")
        private DataOut data;
    }
    @lombok.Data
    public static class DataOut {
        /**
         * 键相类型为波形数据数组下标
         */
        @JSONField(name = "KeyPhaseTyped")
        private Integer keyPhaseTyped = 1;
        /**
         * 磁极数目
         */
        @JSONField(name = "PoleNum")
        private Integer poleNum;
        /**
         * 发电机频率单位（Hz）
         */
        @JSONField(name = "GenerationFreq")
        private Integer generationFreq;
        /**
         * 旋转方向（0：顺时针，1：逆时针）
         */
        @JSONField(name = "Direction")
        private Integer direction;
        /**
         * 记录类型（0：连续采样，1定时采样：）
         */
        @JSONField(name = "RecordFlag")
        private Integer recordFlag;
        @JSONField(name = "Data")
        private List<DataIn> data;

    }

    @Data
    public static class DataIn {
        /**
         * 测点对应KKS编码
         */
        @JSONField(name = "KKSCode")
        private String kKSCode;
        /**
         * 样包采样周期数
         */
        @JSONField(name = "Period")
        private Integer period;
        /**
         * 各键相点相对起始时间偏移
         */
        @JSONField(name = "KeyPhaseOffset")
        private List<Float> keyPhaseOffset;
        /**
         * 数据区域
         */
        @JSONField(name = "Data")
        private List<Float> data;
    }
}
