mirror of
https://gitee.com/myxzgzs/boyue-vue-pro.git
synced 2025-08-08 16:32:46 +08:00
30 lines
983 B
Java
30 lines
983 B
Java
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 {
|
|
|
|
private static final Integer PAGE_NO = 1;
|
|
private static final Integer PAGE_SIZE = 10;
|
|
|
|
@ApiModelProperty(value = "页码,从 1 开始", required = true,example = "1")
|
|
@NotNull(message = "页码不能为空")
|
|
@Min(value = 1, message = "页码最小值为 1")
|
|
private Integer pageNo = PAGE_NO;
|
|
|
|
@ApiModelProperty(value = "每页条数,最大值为 100", required = true, example = "10")
|
|
@NotNull(message = "每页条数不能为空")
|
|
@Range(min = 1, max = 100, message = "条数范围为 [1, 100]")
|
|
private Integer pageSize = PAGE_SIZE;
|
|
|
|
}
|