EnrollByPaymentMessage.php 3.0 KB

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