package com.ylcm.sys.form;

import lombok.Data;

import java.io.Serializable;

/**
 * 分页参数
 * @author liuyu
 */
@Data
public class Page implements Serializable {

	private static final long serialVersionUID = 5044160304796284375L;

	/**
	 * 页容量
	 */
	private Integer pageSize;
	/**
	 * 页码
	 */
	private Integer pageNo;

	public void initPage() {
		this.pageSize = this.pageSize != null && this.pageSize > 0 ? this.pageSize : 10;
		this.pageNo = this.pageNo != null && this.pageNo > 0 ? (this.pageNo - 1) * this.pageSize : 0;
	}
}
