GetVisitorListMessage.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace App\Generated\V1\Messages\UserHome;
  3. use Kamicloud\StubApi\Concerns\ValueHelper;
  4. use Kamicloud\StubApi\Http\Messages\Message;
  5. use Kamicloud\StubApi\Utils\Constants;
  6. class GetVisitorListMessage extends Message
  7. {
  8. use ValueHelper;
  9. protected $page;
  10. protected $limit;
  11. protected $uid;
  12. protected $result;
  13. /**
  14. * 分页(页数)
  15. * @return int|null
  16. */
  17. public function getPage()
  18. {
  19. return $this->page;
  20. }
  21. /**
  22. * 每页多少
  23. * @return int|null
  24. */
  25. public function getLimit()
  26. {
  27. return $this->limit;
  28. }
  29. /**
  30. * 用户id;不天默认取自己的
  31. * @return int|null
  32. */
  33. public function getUid()
  34. {
  35. return $this->uid;
  36. }
  37. public function requestRules()
  38. {
  39. return [
  40. ['page', 'page', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  41. ['limit', 'limit', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  42. ['uid', 'uid', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  43. ];
  44. }
  45. public function responseRules()
  46. {
  47. return [
  48. ['result', 'result', 'bail', null, null],
  49. ];
  50. }
  51. public function setResponse($result)
  52. {
  53. $this->result = $result;
  54. }
  55. }