CreateAnswerMessage.php 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace App\Generated\V1\Messages\User;
  3. use Kamicloud\StubApi\Concerns\ValueHelper;
  4. use Kamicloud\StubApi\Http\Messages\Message;
  5. use Kamicloud\StubApi\Utils\Constants;
  6. class CreateAnswerMessage extends Message
  7. {
  8. use ValueHelper;
  9. protected $questionId;
  10. protected $content;
  11. protected $result;
  12. /**
  13. * @return int
  14. */
  15. public function getQuestionId()
  16. {
  17. return $this->questionId;
  18. }
  19. /**
  20. * @return string
  21. */
  22. public function getContent()
  23. {
  24. return $this->content;
  25. }
  26. public function requestRules()
  27. {
  28. return [
  29. ['questionId', 'question_id', 'bail|integer', Constants::INTEGER, null],
  30. ['content', 'content', 'bail|string', Constants::STRING, 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. }