選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

TicketMessage.php 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use App\Entity\Ticket;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Lc\ShopBundle\Context\TicketInterface;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. /**
  8. * @ORM\MappedSuperclass()
  9. */
  10. abstract class TicketMessage extends AbstractEntity
  11. {
  12. use StatusTrait;
  13. /**
  14. * @Gedmo\Blameable(on="create")
  15. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface")
  16. * @ORM\JoinColumn(nullable=true)
  17. */
  18. protected $createdBy;
  19. /**
  20. * @Gedmo\Blameable(on="update")
  21. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface")
  22. * @ORM\JoinColumn(nullable=true)
  23. */
  24. protected $updatedBy;
  25. /**
  26. * @ORM\Column(type="text")
  27. */
  28. protected $message;
  29. /**
  30. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TicketInterface", inversedBy="ticketMessages")
  31. * @ORM\JoinColumn(nullable=false)
  32. */
  33. protected $ticket;
  34. /**
  35. * @ORM\Column(type="boolean", nullable=true)
  36. */
  37. protected $answerByAdmin;
  38. public function __toString()
  39. {
  40. return $this->message;
  41. }
  42. public function getMessage(): ?string
  43. {
  44. return $this->message;
  45. }
  46. public function setMessage(string $message): self
  47. {
  48. $this->message = $message;
  49. return $this;
  50. }
  51. public function getTicket(): ?TicketInterface
  52. {
  53. return $this->ticket;
  54. }
  55. public function setTicket(?TicketInterface $ticket): self
  56. {
  57. $this->ticket = $ticket;
  58. return $this;
  59. }
  60. public function getAnswerByAdmin(): ?bool
  61. {
  62. return $this->answerByAdmin;
  63. }
  64. public function setAnswerByAdmin(?bool $answerByAdmin): self
  65. {
  66. $this->answerByAdmin = $answerByAdmin;
  67. return $this;
  68. }
  69. }