package com.dsk.common.core.domain.model;

/**
 * 基础分页类
 * @author hypnos
 * @Description
 * @Date Created in 2022-10-27 07:08:54
 * @Modified By hypnos
 */
public class BasePage {
	
	/**
	 * 当前页码
	 */
	private Integer pageNum = 1;

	/**
	 * 当前页码
	 */
	private Integer pageIndex = 1;

	/**
	 * 每页数量
	 */
	private Integer pageSize = 10;
	
	/**
	 * 最大页码
	 */
	private Integer pageMaxNum;
	
	/**
	 * 最大条数
	 */
	private Integer pageMaxSize;

	/**
	 * 总中标金额
	 */
	private String field = "bidSumAmount";

	private String order;

	
	public Integer getPageIndex() {
		return pageNum;
	}
	public Integer getPageNum() {
		return pageMaxNum != null && pageNum > pageMaxNum?  pageMaxNum : pageNum;
	}

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

	public Integer getPageSize() {
		return pageMaxSize != null && pageSize > pageMaxSize?  pageMaxSize : pageSize;
	}

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

	public Integer getPageMaxNum() {
		return pageMaxNum;
	}

	public void setPageMaxNum(Integer pageMaxNum) {
		this.pageMaxNum = pageMaxNum;
	}

	public Integer getPageMaxSize() {
		return pageMaxSize;
	}

	public void setPageMaxSize(Integer pageMaxSize) {
		this.pageMaxSize = pageMaxSize;
	}

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

	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("BasePageVo [pageIndex=");
		builder.append(pageNum);
		builder.append(", pageSize=");
		builder.append(pageSize);
		builder.append("]");
		return builder.toString();
	}

}
