PageDTO.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace App\Generated\V1_1\DTOs;
  3. use Kamicloud\StubApi\Concerns\ValueHelper;
  4. use Kamicloud\StubApi\DTOs\DTO;
  5. use Kamicloud\StubApi\Utils\Constants;
  6. class PageDTO extends DTO
  7. {
  8. use ValueHelper;
  9. protected $total;
  10. protected $page;
  11. protected $limit;
  12. /**
  13. * 总数
  14. * @return int
  15. */
  16. public function getTotal()
  17. {
  18. return $this->total;
  19. }
  20. /**
  21. * 页码
  22. * @return int
  23. */
  24. public function getPage()
  25. {
  26. return $this->page;
  27. }
  28. /**
  29. * 页距
  30. * @return int
  31. */
  32. public function getLimit()
  33. {
  34. return $this->limit;
  35. }
  36. public function setTotal($total)
  37. {
  38. $this->total = $total;
  39. }
  40. public function setPage($page)
  41. {
  42. $this->page = $page;
  43. }
  44. public function setLimit($limit)
  45. {
  46. $this->limit = $limit;
  47. }
  48. public function getAttributeMap()
  49. {
  50. return [
  51. ['total', 'total', 'bail|integer', Constants::INTEGER, null],
  52. ['page', 'page', 'bail|integer', Constants::INTEGER, null],
  53. ['limit', 'limit', 'bail|integer', Constants::INTEGER, null],
  54. ];
  55. }
  56. }