66 lines
1.5KB

  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. public function getMessage(): ?string
  35. {
  36. return $this->message;
  37. }
  38. public function setMessage(string $message): self
  39. {
  40. $this->message = $message;
  41. return $this;
  42. }
  43. public function getTicket(): ?TicketInterface
  44. {
  45. return $this->ticket;
  46. }
  47. public function setTicket(?TicketInterface $ticket): self
  48. {
  49. $this->ticket = $ticket;
  50. return $this;
  51. }
  52. }