package com.wx.application.nebula.graph.query;

import lombok.Data;

@Data
public class PageRequest {
	
	private Integer page = 1;
	
	private Integer pageSize = 200;

	public static PageRequest of(Integer page,Integer pageSize) {
		PageRequest pt = new PageRequest();
		pt.setPage(page);
		pt.setPageSize(pageSize);
		return pt;
	}
	
	public Integer skip() {
		return (page-1 < 0?0:page-1) * pageSize;
	}
}
