package com.qmth.exam.reserve.bean;

import io.swagger.annotations.ApiModelProperty;

public class PagerReq implements IModel {

    private static final long serialVersionUID = -5839219654819501696L;

    @ApiModelProperty(value = "第几页(从1开始)")
    protected Integer pageNumber;

    @ApiModelProperty(value = "每页条数")
    protected Integer pageSize;

    public Integer getPageNumber() {
        // 默认值
        if (pageNumber == null || pageNumber < 1) {
            pageNumber = 1;
        }

        return pageNumber;
    }

    public Integer getPageSize() {
        // 默认值
        if (pageSize == null || pageSize < 1) {
            pageSize = 10;
        }

        return pageSize;
    }

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

}
