SoftDeleteable.php 865 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Mapping\Fixture;
  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 SoftDeleteable
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
  19. */
  20. private $deletedAt;
  21. public function getId()
  22. {
  23. return $this->id;
  24. }
  25. public function setTitle($title)
  26. {
  27. $this->title = $title;
  28. }
  29. public function getTitle()
  30. {
  31. return $this->title;
  32. }
  33. public function setCode($code)
  34. {
  35. $this->code = $code;
  36. }
  37. public function getCode()
  38. {
  39. return $this->code;
  40. }
  41. public function getSlug()
  42. {
  43. return $this->slug;
  44. }
  45. }