package com.njcn.system.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
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/07/11 19:24
 */
@Data
public class AuditParam {

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

    @ApiModelProperty("结束时间")
    @Pattern(regexp = PatternRegex.TIME_FORMAT, message = "时间格式错误")
    private String searchEndTime;

    @ApiModelProperty("登录名")
    private String loginName;

    @ApiModelProperty("事件类型(0.业务事件 1.系统事件)")
    private Integer type;

    @ApiModelProperty("操作类型")
    private String operateType;

    @ApiModelProperty("结果")
    private Integer result;

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

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

    @ApiModelProperty("排序")
    private String orderBy;

    @ApiModelProperty("排序字段")
    private String sortBy;

    @ApiModelProperty("排序字段中文名")
    private String sortName;

    @ApiModelProperty("是否导出")
    private boolean export;

}
