package com.njcn.csharmonic.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Description:
 * Date: 2023/6/14  15:09【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Data
public class DevicDataTrendQueryParam {
    @ApiModelProperty(value = "监测点id")
    @NotBlank(message="监测点id不能为空")
    private String lineId;
    @ApiModelProperty(value = "查询指标集合")
    @NotBlank(message="查询指标不能为空")
    private List<StatisticalParam> statisticalParams;

    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @NotNull(message="开始时间不能为空！")
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @NotNull(message="结束时间不能为空！")
    private String endTime;

    @ApiModelProperty(value = "数据类型")
    private String dataLevel;

    private String devId;
    @Data
    public static class StatisticalParam{
        private String classId;
        private String dataId;
        private String name;
        private String phase;
        private String statMethod;
        private String anotherName;
        private String unit;
    }


}
