Comment.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace SoftDeleteable\Fixture\Entity;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity
  7. * @Gedmo\SoftDeleteable(fieldName="deletedAt")
  8. */
  9. class Comment
  10. {
  11. /**
  12. * @ORM\Column(name="id", type="integer")
  13. * @ORM\Id
  14. * @ORM\GeneratedValue(strategy="IDENTITY")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\Column(name="comment", type="string")
  19. */
  20. private $comment;
  21. /**
  22. * @ORM\Column(name="deletedAt", type="datetime", nullable=true)
  23. */
  24. private $deletedAt;
  25. /**
  26. * @ORM\ManyToOne(targetEntity="Article", inversedBy="comments")
  27. */
  28. private $article;
  29. public function getId()
  30. {
  31. return $this->id;
  32. }
  33. public function setComment($comment)
  34. {
  35. $this->comment = $comment;
  36. }
  37. public function getComment()
  38. {
  39. return $this->comment;
  40. }
  41. public function setDeletedAt($deletedAt)
  42. {
  43. $this->deletedAt = $deletedAt;
  44. }
  45. public function getDeletedAt()
  46. {
  47. return $this->deletedAt;
  48. }
  49. public function getArticle()
  50. {
  51. return $this->article;
  52. }
  53. }