package com.mvc.model;

import com.github.pagehelper.Page;

/**
 * 请求结果分页对象
 */
public class ResPageModel {
    public ResPageModel(Object list, int pageNum, int pageSize, long total){
        this.list=list;
        this.pageNum=pageNum;
        this.pageSize=pageSize;
        this.total=total;
    }

    public ResPageModel(Object list, Page<Object> pageObject){
        this.list=list;
        pageNum=pageObject.getPageNum();
        pageSize=pageObject.getPageSize();
        total=pageObject.getTotal();
    }

    private Object list;
    private Integer pageNum;
    private Integer pageSize;
    private Long total;

    public Object getList() {
        return list;
    }

    public void setList(Object list) {
        this.list = list;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

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

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }
}
