25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1005B

  1. package com.example.webapi.dto;
  2. import io.swagger.annotations.ApiModel;
  3. import io.swagger.annotations.ApiModelProperty;
  4. import lombok.Data;
  5. /**
  6. * 基础分页DTO
  7. *
  8. * @author Your Name
  9. * @version 1.0.0
  10. */
  11. @Data
  12. @ApiModel(description = "基础分页参数")
  13. public class BasePageDTO {
  14. /**
  15. * 页码(从0开始)
  16. */
  17. @ApiModelProperty(value = "页码(从0开始)", example = "0", notes = "默认为0")
  18. private Integer page = 0;
  19. /**
  20. * 每页大小
  21. */
  22. @ApiModelProperty(value = "每页大小", example = "10", notes = "默认为10")
  23. private Integer size = 10;
  24. /**
  25. * 排序字段
  26. */
  27. @ApiModelProperty(value = "排序字段", example = "id", notes = "可选")
  28. private String sortBy;
  29. /**
  30. * 排序方向(asc/desc)
  31. */
  32. @ApiModelProperty(value = "排序方向", example = "asc", notes = "可选值:asc(升序)、desc(降序),默认为asc")
  33. private String sortDirection = "asc";
  34. }