HistoryLog.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace Gedmo\Loggable\Entity;
  3. use Gedmo\Loggable\AbstractHistoryLog;
  4. /**
  5. * @Entity
  6. * @gedmo:Loggable
  7. */
  8. class HistoryLog extends AbstractHistoryLog
  9. {
  10. /**
  11. * @var integer $id
  12. *
  13. * @Column(name="id", type="integer")
  14. * @Id
  15. * @GeneratedValue(strategy="IDENTITY")
  16. */
  17. protected $id;
  18. /**
  19. * @var string $user
  20. *
  21. * @Column(name="user", type="string", length=128)
  22. */
  23. protected $user;
  24. /**
  25. * @var string $action
  26. *
  27. * @Column(type="string", length=64)
  28. */
  29. protected $action;
  30. /**
  31. * @var string $objectClass
  32. *
  33. * @Column(name="object_class", type="string", length=255)
  34. */
  35. protected $objectClass;
  36. /**
  37. * @var string $foreignKey
  38. *
  39. * @Column(name="foreign_key", type="string", length=64)
  40. */
  41. protected $foreignKey;
  42. /**
  43. * @var string $date
  44. *
  45. * @Column(name="date", type="datetime", length=8)
  46. */
  47. protected $date;
  48. protected function actualizeDate()
  49. {
  50. $this->date = new \DateTime();
  51. }
  52. }