MappedSupperClass.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. namespace Timestampable\Fixture;
  3. use Gedmo\Mapping\Annotation as Gedmo;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\MappedSuperclass
  7. */
  8. class MappedSupperClass
  9. {
  10. /**
  11. * @var integer $id
  12. *
  13. * @ORM\Column(name="id", type="integer")
  14. * @ORM\Id
  15. * @ORM\GeneratedValue(strategy="AUTO")
  16. */
  17. protected $id;
  18. /**
  19. * @var string $locale
  20. *
  21. * @Gedmo\Locale
  22. */
  23. protected $locale;
  24. /**
  25. * @var string $title
  26. *
  27. * @Gedmo\Translatable
  28. * @ORM\Column(name="name", type="string", length=255)
  29. */
  30. protected $name;
  31. /**
  32. * @var \DateTime $createdAt
  33. *
  34. * @ORM\Column(name="created_at", type="datetime")
  35. * @Gedmo\Timestampable(on="create")
  36. */
  37. protected $createdAt;
  38. /**
  39. * Get id
  40. *
  41. * @return integer $id
  42. * @codeCoverageIgnore
  43. */
  44. public function getId()
  45. {
  46. return $this->id;
  47. }
  48. /**
  49. * Set name
  50. *
  51. * @param string $name
  52. */
  53. public function setName($name)
  54. {
  55. $this->name = $name;
  56. }
  57. /**
  58. * Get name
  59. *
  60. * @return string $name
  61. */
  62. public function getName()
  63. {
  64. return $this->name;
  65. }
  66. /**
  67. * Get createdAt
  68. *
  69. * @return \DateTime $createdAt
  70. */
  71. public function getCreatedAt()
  72. {
  73. return $this->createdAt;
  74. }
  75. }