|
- package com.example.webapi.dto;
-
- import io.swagger.annotations.ApiModel;
- import io.swagger.annotations.ApiModelProperty;
- import lombok.Data;
-
- /**
- * 基础分页DTO
- *
- * @author Your Name
- * @version 1.0.0
- */
- @Data
- @ApiModel(description = "基础分页参数")
- public class BasePageDTO {
-
- /**
- * 页码(从0开始)
- */
- @ApiModelProperty(value = "页码(从0开始)", example = "0", notes = "默认为0")
- private Integer page = 0;
-
- /**
- * 每页大小
- */
- @ApiModelProperty(value = "每页大小", example = "10", notes = "默认为10")
- private Integer size = 10;
-
- /**
- * 排序字段
- */
- @ApiModelProperty(value = "排序字段", example = "id", notes = "可选")
- private String sortBy;
-
- /**
- * 排序方向(asc/desc)
- */
- @ApiModelProperty(value = "排序方向", example = "asc", notes = "可选值:asc(升序)、desc(降序),默认为asc")
- private String sortDirection = "asc";
- }
|