Comment.php 1.1 KB

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