GetCouponDetailMessage.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace App\Generated\V1\Messages\Payment;
  3. use Kamicloud\StubApi\Concerns\ValueHelper;
  4. use Kamicloud\StubApi\Http\Messages\Message;
  5. use Kamicloud\StubApi\Utils\Constants;
  6. class GetCouponDetailMessage extends Message
  7. {
  8. use ValueHelper;
  9. protected $couponId;
  10. protected $goodsId;
  11. protected $result;
  12. /**
  13. * @return int
  14. */
  15. public function getCouponId()
  16. {
  17. return $this->couponId;
  18. }
  19. /**
  20. * @return int|null
  21. */
  22. public function getGoodsId()
  23. {
  24. return $this->goodsId;
  25. }
  26. public function requestRules()
  27. {
  28. return [
  29. ['couponId', 'coupon_id', 'bail|integer', Constants::INTEGER, null],
  30. ['goodsId', 'goods_id', 'bail|nullable|integer', Constants::INTEGER | Constants::OPTIONAL, null],
  31. ];
  32. }
  33. public function responseRules()
  34. {
  35. return [
  36. ['result', 'result', 'bail', null, null],
  37. ];
  38. }
  39. public function setResponse($result)
  40. {
  41. $this->result = $result;
  42. }
  43. }