package com.sckw.core.web.response.result;

/**
 * @author lfdc
 * @description
 * @date 2023-09-14 09:09:06
 */
public class Page {
    private static final long serialVersionUID = 7367318386929321066L;
    private long total;
    private int page;
    private int pageSize;

    public static Page getPage(long total, int page, int pageSize) {
        return new Page(total, page, pageSize);
    }

    public long getTotal() {
        return this.total;
    }

    public int getPage() {
        return this.page;
    }

    public int getPageSize() {
        return this.pageSize;
    }

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

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

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

    @Override
    public String toString() {
        return "Page(total=" + this.getTotal() + ", page=" + this.getPage() + ", pageSize=" + this.getPageSize() + ")";
    }

    public Page() {
    }

    public Page(long total, int page, int pageSize) {
        this.total = total;
        this.page = page;
        this.pageSize = pageSize;
    }
}