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.

95 line
2.0KB

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