PageInfo.java
805 Bytes
package com.infoloop.tianting.model.common;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
@Data
@ApiModel(description = "公共分页参数")
public class PageInfo {
@NotNull(message = "当前页码不能为空")
@Min(value = 1, message = "当前页码不能小于1")
@ApiModelProperty(value = "当前页码", required = true, example = "1")
private Integer pageNo;
@NotNull(message = "每页条数不能为空")
@Max(value = 1000, message = "每页条数不能大于1000")
@ApiModelProperty(value = "每页条数", required = true, example = "10")
private Integer pageSize;
}