Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

46 lines
1000B

  1. <?php
  2. namespace App\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. trait TimestampableTrait
  6. {
  7. /**
  8. * @ORM\Column(type="datetime")
  9. * @Gedmo\Timestampable(on="create")
  10. */
  11. protected $createdAt;
  12. /**
  13. * @ORM\Column(type="datetime")
  14. * @Gedmo\Timestampable(on="update")
  15. */
  16. protected $updatedAt;
  17. public function getCreatedAt(): ?\DateTimeInterface
  18. {
  19. return $this->createdAt;
  20. }
  21. public function setCreatedAt(\DateTimeInterface $createdAt): self
  22. {
  23. $this->createdAt = $createdAt;
  24. return $this;
  25. }
  26. public function getUpdatedAt(): ?\DateTimeInterface
  27. {
  28. return $this->updatedAt;
  29. }
  30. public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  31. {
  32. $this->updatedAt = $updatedAt;
  33. return $this;
  34. }
  35. }