EnrollByFreeMessage.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. namespace App\Generated\V1_1\Messages\Pair;
  3. use Kamicloud\StubApi\Concerns\ValueHelper;
  4. use Kamicloud\StubApi\Http\Messages\Message;
  5. use Kamicloud\StubApi\Utils\Constants;
  6. class EnrollByFreeMessage extends Message
  7. {
  8. use ValueHelper;
  9. protected $stageId;
  10. protected $mediaId;
  11. protected $km;
  12. protected $lng;
  13. protected $lat;
  14. protected $location;
  15. protected $sex;
  16. protected $sxo;
  17. protected $minAge;
  18. protected $maxAge;
  19. protected $pair;
  20. /**
  21. * 活动期数
  22. * @return int
  23. */
  24. public function getStageId()
  25. {
  26. return $this->stageId;
  27. }
  28. /**
  29. * 渠道ID
  30. * @return string|null
  31. */
  32. public function getMediaId()
  33. {
  34. return $this->mediaId;
  35. }
  36. /**
  37. * 范围:km
  38. * @return int
  39. */
  40. public function getKm()
  41. {
  42. return $this->km;
  43. }
  44. /**
  45. * 经度
  46. * @return string
  47. */
  48. public function getLng()
  49. {
  50. return $this->lng;
  51. }
  52. /**
  53. * 纬度
  54. * @return string
  55. */
  56. public function getLat()
  57. {
  58. return $this->lat;
  59. }
  60. /**
  61. * 地理位置
  62. * @return string
  63. */
  64. public function getLocation()
  65. {
  66. return $this->location;
  67. }
  68. /**
  69. * 性别:1=男,2=女
  70. * @return int
  71. */
  72. public function getSex()
  73. {
  74. return $this->sex;
  75. }
  76. /**
  77. * 性取向:1=男,2=女 ...
  78. * @return int
  79. */
  80. public function getSxo()
  81. {
  82. return $this->sxo;
  83. }
  84. /**
  85. * 匹配最小年龄
  86. * @return int
  87. */
  88. public function getMinAge()
  89. {
  90. return $this->minAge;
  91. }
  92. /**
  93. * 匹配最大年龄
  94. * @return int
  95. */
  96. public function getMaxAge()
  97. {
  98. return $this->maxAge;
  99. }
  100. public function requestRules()
  101. {
  102. return [
  103. ['stageId', 'stage_id', 'bail|integer', Constants::INTEGER, null],
  104. ['mediaId', 'media_id', 'bail|nullable|string', Constants::STRING | Constants::OPTIONAL, null],
  105. ['km', 'km', 'bail|integer', Constants::INTEGER, null],
  106. ['lng', 'lng', 'bail|string', Constants::STRING, null],
  107. ['lat', 'lat', 'bail|string', Constants::STRING, null],
  108. ['location', 'location', 'bail|string', Constants::STRING, null],
  109. ['sex', 'sex', 'bail|integer', Constants::INTEGER, null],
  110. ['sxo', 'sxo', 'bail|integer', Constants::INTEGER, null],
  111. ['minAge', 'min_age', 'bail|integer', Constants::INTEGER, null],
  112. ['maxAge', 'max_age', 'bail|integer', Constants::INTEGER, null],
  113. ];
  114. }
  115. public function responseRules()
  116. {
  117. return [
  118. ['pair', 'pair', 'bail', null, null],
  119. ];
  120. }
  121. public function setResponse($pair)
  122. {
  123. $this->pair = $pair;
  124. }
  125. }