package com.njcn.energy.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * pqs
 * 空调策略
 * @author cdf
 * @date 2022/4/21
 */

@Data
@ApiModel
public class AirStrategyParam{


    @ApiModelProperty(name = "策略名称",required = true)
    @NotBlank(message = "名称不可为空")
    private String name;

    @ApiModelProperty(name = "类型",required = true,value = "0.普通策略 1.关机策略 2.开机策略")
    @NotNull(message = "策略类型不能为空")
    private Integer type;

    @ApiModelProperty(name = "开始时间",required = true)
    private String startTime;

    @ApiModelProperty(name = "结束时间",required = true)
    private String endTime;

    @ApiModelProperty(name = "空调模式",required = true)
    @NotBlank(message = "模式不可为空")
    private String mode;
    @ApiModelProperty(name = "空调温度",required = true)
    @NotNull(message = "空调温度不可为空")
    private Integer temperature;

    @ApiModelProperty(name = "空调风速",required = true)
    @NotBlank(message = "空调风速不可为空")
    private String wind;

    @ApiModelProperty(name = "排序",required = true)
    @NotNull(message = "排序不可为空")
    private Integer sort;

    @ApiModelProperty(name = "监测点集",required = true)
    @NotEmpty(message = "监测点集不可为空")
    private List<String> lineIds;



    /**
     * 更新操作实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class AirUpdateParam extends AirStrategyParam {

        @ApiModelProperty("id")
        @NotBlank(message = ValidMessage.ID_NOT_BLANK)
        @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
        private String id;

    }

    /**
     * 分页查询实体
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class AirStrategyQueryParam extends BaseParam {

        private Integer type;

    }


}
