88 rindas
2.0KB

  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. }