package com.bonus.core.common.utils;

import cn.hutool.core.util.ObjectUtil;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

public class PageDTO implements Serializable {
   @ApiModelProperty("当前页")
   private Long current;
   @ApiModelProperty("每页显示条数")
   private Long size;

   public Long getCurrent() {
      return !ObjectUtil.isNull(this.current) && this.current > 0L ? this.current : 1L;
   }

   public Long getSize() {
      return !ObjectUtil.isNull(this.size) && this.size != 0L ? this.size : 10L;
   }

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

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