use JMS\Serializer\Annotation\XmlRoot;
use Symfony\Component\Validator\Constraints as Assert;
use Wallabag\AnnotationBundle\Entity\Annotation;
+use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
use Wallabag\UserBundle\Entity\User;
/**
*/
class Entry
{
+ use EntityTimestampsTrait;
+
/** @Serializer\XmlAttribute */
/**
* @var int
return $this->updatedAt;
}
- /**
- * @ORM\PrePersist
- * @ORM\PreUpdate
- */
- public function timestamps()
- {
- if (null === $this->createdAt) {
- $this->createdAt = new \DateTime();
- }
-
- $this->updatedAt = new \DateTime();
- }
-
/**
* @return ArrayCollection<Annotation>
*/