IsSelectedListMessage.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. namespace App\Generated\V1\Messages\AdminPartner;
  3. use App\Generated\V1\Enums\Gender;
  4. use Kamicloud\StubApi\Concerns\ValueHelper;
  5. use Kamicloud\StubApi\Http\Messages\Message;
  6. use Kamicloud\StubApi\Utils\Constants;
  7. use App\Generated\V1\DTOs\AdminPartnerDTO;
  8. use App\Generated\V1\DTOs\PageDTO;
  9. class IsSelectedListMessage extends Message
  10. {
  11. use ValueHelper;
  12. protected $pages;
  13. protected $isFeedPush;
  14. protected $sex;
  15. protected $page;
  16. protected $partners;
  17. /**
  18. * 页码
  19. * @return int|null
  20. */
  21. public function getPages()
  22. {
  23. return $this->pages;
  24. }
  25. /**
  26. * 是否只看可推流的:true=是;false=全部
  27. * @return boolean|null
  28. */
  29. public function getIsFeedPush()
  30. {
  31. return $this->isFeedPush;
  32. }
  33. /**
  34. * 是否只看可推流的:true=是;false=全部
  35. * @return boolean|null
  36. */
  37. public function isIsFeedPush()
  38. {
  39. return $this->isFeedPush;
  40. }
  41. /**
  42. * 性别 0=全部
  43. * @return mixed|null
  44. */
  45. public function getSex()
  46. {
  47. return $this->sex;
  48. }
  49. public function requestRules()
  50. {
  51. return [
  52. ['pages', 'pages', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  53. ['isFeedPush', 'is_feed_push', 'bail|nullable|boolean', Constants::BOOLEAN | Constants::OPTIONAL, null],
  54. ['sex', 'sex', Gender::class, Constants::ENUM | Constants::OPTIONAL, null],
  55. ];
  56. }
  57. public function responseRules()
  58. {
  59. return [
  60. ['page', 'page', PageDTO::class, Constants::MODEL, null],
  61. ['partners', 'partners', AdminPartnerDTO::class, Constants::MODEL | Constants::ARRAY, null],
  62. ];
  63. }
  64. public function setResponse($page, $partners)
  65. {
  66. $this->page = $page;
  67. $this->partners = $partners;
  68. }
  69. }