package com.njcn.gather.monitor.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.gather.pojo.constant.DetectionValidMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * @author caozehui
 * @data 2024-12-12
 */
@Data
public class PqMonitorParam {

    @ApiModelProperty(value = "所属设备id")
    @NotBlank(message = DetectionValidMessage.DEVICE_ID_NOT_BLANK)
    private String devId;

    @ApiModelProperty(value = "所属母线")
    @NotBlank(message = DetectionValidMessage.BELONG_LINE_NOT_BLANK)
    private String busbar;

    @ApiModelProperty(value = "监测点名称")
    @NotBlank(message = DetectionValidMessage.MONITOR_NAME_NOT_BLANK)
    private String name;

    @ApiModelProperty(value = "线路号(监测点序号)")
    @NotNull(message = DetectionValidMessage.MONITOR_NUM_NOT_NULL)
    private Integer num;

    @ApiModelProperty(value = "PT变比")
    @NotBlank(message = DetectionValidMessage.PT_NOT_BLANK)
    private String pt;

    @ApiModelProperty(value = "CT变比")
    @NotBlank(message = DetectionValidMessage.CT_NOT_BLANK)
    private String ct;

    @ApiModelProperty(value = "接线方式")
    @NotBlank(message = DetectionValidMessage.CONNECTION_NOT_BLANK)
    @Pattern(regexp = PatternRegex.SYSTEM_ID, message = DetectionValidMessage.CONNECTION_FORMAT_ERROR)
    private String connection;

    @ApiModelProperty(value = "统计间隔")
    @NotNull(message = DetectionValidMessage.STAT_INTERVAL_NOT_NULL)
    private Integer statInterval;

    @ApiModelProperty(value = "谐波系统监测点id")
//    @NotBlank(message = DetectionValidMessage.MONITOR_ID_NOT_BLANK)
    private String harmSysId;

    @ApiModelProperty(value = "是否做检测")
    private Integer checkFlag;


    /**
     * 分页查询实体
     */
    @Data
    public static class QueryParam {
        @ApiModelProperty(value = "所属设备id")
        @NotBlank(message = DetectionValidMessage.DEVICE_ID_NOT_BLANK)
        private List<String> devIds;
    }
}
