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.

107 satır
2.3KB

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