LowListMessage.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace App\Generated\V1\Messages\AdminPartner;
  3. use Kamicloud\StubApi\Concerns\ValueHelper;
  4. use Kamicloud\StubApi\Http\Messages\Message;
  5. use Kamicloud\StubApi\Utils\Constants;
  6. use App\Generated\V1\DTOs\AdminPartnerDTO;
  7. use App\Generated\V1\DTOs\PageDTO;
  8. class LowListMessage extends Message
  9. {
  10. use ValueHelper;
  11. protected $pages;
  12. protected $page;
  13. protected $partners;
  14. /**
  15. * 页码
  16. * @return int|null
  17. */
  18. public function getPages()
  19. {
  20. return $this->pages;
  21. }
  22. public function requestRules()
  23. {
  24. return [
  25. ['pages', 'pages', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  26. ];
  27. }
  28. public function responseRules()
  29. {
  30. return [
  31. ['page', 'page', PageDTO::class, Constants::MODEL, null],
  32. ['partners', 'partners', AdminPartnerDTO::class, Constants::MODEL | Constants::ARRAY, null],
  33. ];
  34. }
  35. public function setResponse($page, $partners)
  36. {
  37. $this->page = $page;
  38. $this->partners = $partners;
  39. }
  40. }