package com.ruoyi.web.v3.model;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

@Data
public class BasePageRequest {

    @Min(1)
    private Integer pageNum = 1;

    @Min(1)
    @Max(1000)
    private Integer pageSize = 10;

    public <T> Page<T> toPage() {
        return new Page<>(pageNum, pageSize);
    }

}
