Article.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. namespace Mapping\Fixture\Compatibility;
  3. /**
  4. * @Entity
  5. */
  6. class Article
  7. {
  8. /** @Id @GeneratedValue @Column(type="integer") */
  9. private $id;
  10. /**
  11. * @Column(name="title", type="string", length=128)
  12. */
  13. private $title;
  14. /**
  15. * @var datetime $created
  16. *
  17. * @gedmo:Timestampable(on="create")
  18. * @Column(name="created", type="date")
  19. */
  20. private $created;
  21. /**
  22. * @var datetime $updated
  23. *
  24. * @Column(name="updated", type="datetime")
  25. * @gedmo:Timestampable
  26. */
  27. private $updated;
  28. public function getId()
  29. {
  30. return $this->id;
  31. }
  32. public function setTitle($title)
  33. {
  34. $this->title = $title;
  35. }
  36. public function getTitle()
  37. {
  38. return $this->title;
  39. }
  40. /**
  41. * Get created
  42. *
  43. * @return datetime $created
  44. */
  45. public function getCreated()
  46. {
  47. return $this->created;
  48. }
  49. public function setCreated(\DateTime $created)
  50. {
  51. $this->created = $created;
  52. }
  53. /**
  54. * Get updated
  55. *
  56. * @return datetime $updated
  57. */
  58. public function getUpdated()
  59. {
  60. return $this->updated;
  61. }
  62. public function setUpdated(\DateTime $updated)
  63. {
  64. $this->updated = $updated;
  65. }
  66. }