package com.njcn.harmonic.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Description:
 * Date: 2023/12/13  15:53【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
@Data
public class SendQueryParam extends BaseParam {
    @ApiModelProperty(name = "deptIndex", value = "部门索引", required = true)
    @NotBlank(message = "部门索引不可为空")
    private String deptIndex;

    @ApiModelProperty("开始时间")
    @Pattern(regexp = PatternRegex.TIME_FORMAT, message = "时间格式错误")
    private String searchBeginTime;

    @ApiModelProperty("结束时间")
    @Pattern(regexp = PatternRegex.TIME_FORMAT, message = "时间格式错误")
    private String searchEndTime;
    @Data
    public static class SendPageParam  extends SendQueryParam {
        @NotNull(message="当前页不能为空！")
        @Min(value = 1, message = "当前页不能为0")
        @ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
        private Integer pageNum;
        /**显示条数*/
        @NotNull(message="显示条数不能为空！")
        @ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
        private Integer pageSize;

        @ApiModelProperty("时间维度")
        @NotBlank(message = "时间维度不可为空")
        private String dataType;
    }
}
