package com.njcn.device.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

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

/**
 * @version 1.0.0
 * @author: chenchao
 * @date: 2022/06/01 11:24
 */
@Data
@ApiModel
public class EventLogParam {

    /**
     * 推送状态
     */
    @ApiModelProperty("推送状态(0.全部1.成功2.失败)")
    private Integer result;
    /**
     * 开始时间
     */
    @ApiModelProperty("开始时间")
    @Pattern(regexp = PatternRegex.TIME_FORMAT, message = "时间格式错误")
    private String searchBeginTime;
    /**
     * 结束时间
     */
    @ApiModelProperty("结束时间")
    @Pattern(regexp = PatternRegex.TIME_FORMAT, message = "时间格式错误")
    private String searchEndTime;

    @ApiModelProperty("页码")
    @NotNull(message = "页码不可为空")
    @Range(min = 1,message = "页码必须大于0")
    private Integer pageNum;

    @ApiModelProperty("条数")
    @NotNull(message = "条数不可为空")
    @Range(min = 1,message = "条数必须大于0")
    private Integer pageSize;

}
