package com.nantian.cloud.jly.vo.util;

/**
 * @Description: Pages类的描述
 * @Author: wuyuanhao
 * @CreateDate: 2021/5/7 14:39
 * @UpdateUser: wuyuanhao
 * @UpdateDate: 2021/5/7 14:39
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public class Pages {
    /**
     * 每页显示条数，默认 10
     */
    private long size = 10;
    /**
     * 当前页
     */
    private long current = 1;

    /**
     * 查询数据开始
     */
    private  long offset;

    /**
     * 查询数据结束
     */
    private  long limit;


    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public long getCurrent() {

        return current;
    }

    public void setCurrent(long current) {
        this.current = current;
    }

    public long getOffset() {

        return  (getCurrent()-1) * getSize();
    }

    public void setOffset(long offset) {
        this.offset = offset;
    }

    public long getLimit() {
        return  getSize();
    }

    public void setLimit(long limit) {
        this.limit = limit;
    }
}
