You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 line
2.2KB

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