package com.zhongdao.jlr.business.vo;

/***
 * 分页信息
 */

public class PageInfo {

    private Integer page;
    private Integer rows;
    private Integer currentIndex;

    // 获取 第page页的起始索引
    public int getCurrentIndex() {
        return (page - 1) * rows;
    }


    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getRows() {
        return rows;
    }

    public void setRows(Integer rows) {
        this.rows = rows;
    }

    public void setCurrentIndex(Integer currentIndex) {
        this.currentIndex = currentIndex;
    }

    @Override
    public String toString() {
        return "PageInfo{" +
                "page=" + page +
                ", rows=" + rows +
                ", currentIndex=" + currentIndex +
                '}';
    }
}
