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.

105 satır
2.4KB

  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. /**
  39. * @ORM\Column(type="string", length=255, nullable=true)
  40. */
  41. protected $imageFilename;
  42. public function __toString()
  43. {
  44. return $this->message;
  45. }
  46. public function getMessage(): ?string
  47. {
  48. return $this->message;
  49. }
  50. public function setMessage(string $message): self
  51. {
  52. $this->message = $message;
  53. return $this;
  54. }
  55. public function getTicket(): ?TicketInterface
  56. {
  57. return $this->ticket;
  58. }
  59. public function setTicket(?TicketInterface $ticket): self
  60. {
  61. $this->ticket = $ticket;
  62. return $this;
  63. }
  64. public function getAnswerByAdmin(): ?bool
  65. {
  66. return $this->answerByAdmin;
  67. }
  68. public function setAnswerByAdmin(?bool $answerByAdmin): self
  69. {
  70. $this->answerByAdmin = $answerByAdmin;
  71. return $this;
  72. }
  73. public function getImageFilename(): ?string
  74. {
  75. return $this->imageFilename;
  76. }
  77. public function setImageFilename(?string $imageFilename): self
  78. {
  79. $this->imageFilename = $imageFilename;
  80. return $this;
  81. }
  82. }