Comment.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace Loggable\Fixture\Entity;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity
  7. * @Gedmo\Loggable(logEntryClass="Loggable\Fixture\Entity\Log\Comment")
  8. */
  9. class Comment
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @Gedmo\Versioned
  19. * @ORM\Column(length=128)
  20. */
  21. private $subject;
  22. /**
  23. * @Gedmo\Versioned
  24. * @ORM\Column(type="text")
  25. */
  26. private $message;
  27. /**
  28. * @Gedmo\Versioned
  29. * @ORM\ManyToOne(targetEntity="RelatedArticle", inversedBy="comments")
  30. */
  31. private $article;
  32. public function setArticle($article)
  33. {
  34. $this->article = $article;
  35. }
  36. public function getArticle()
  37. {
  38. return $this->article;
  39. }
  40. public function getId()
  41. {
  42. return $this->id;
  43. }
  44. public function setSubject($subject)
  45. {
  46. $this->subject = $subject;
  47. }
  48. public function getSubject()
  49. {
  50. return $this->subject;
  51. }
  52. public function setMessage($message)
  53. {
  54. $this->message = $message;
  55. }
  56. public function getMessage()
  57. {
  58. return $this->message;
  59. }
  60. }