Blame view

src/main/java/cn/iocoder/dashboard/common/pojo/PageParam.java 983 Bytes
0a607861   YunaiV   common 包,基础组件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  package cn.iocoder.dashboard.common.pojo;
  
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;
  import org.hibernate.validator.constraints.Range;
  
  import javax.validation.constraints.Min;
  import javax.validation.constraints.NotNull;
  import java.io.Serializable;
  
  @ApiModel("分页参数")
  @Data
  public class PageParam implements Serializable {
  
95857ace   YunaiV   完成 config 模块的单元测试
16
17
18
      private static final Integer PAGE_NO = 1;
      private static final Integer PAGE_SIZE = 10;
  
0a607861   YunaiV   common 包,基础组件
19
20
21
      @ApiModelProperty(value = "页码,从 1 开始", required = true,example = "1")
      @NotNull(message = "页码不能为空")
      @Min(value = 1, message = "页码最小值为 1")
95857ace   YunaiV   完成 config 模块的单元测试
22
      private Integer pageNo = PAGE_NO;
0a607861   YunaiV   common 包,基础组件
23
24
25
26
  
      @ApiModelProperty(value = "每页条数,最大值为 100", required = true, example = "10")
      @NotNull(message = "每页条数不能为空")
      @Range(min = 1, max = 100, message = "条数范围为 [1, 100]")
95857ace   YunaiV   完成 config 模块的单元测试
27
      private Integer pageSize = PAGE_SIZE;
0a607861   YunaiV   common 包,基础组件
28
29
  
  }