use Wallabag\ApiBundle\Entity\Client;
use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\Entry;
+use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
/**
* User.
*/
class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterface
{
+ use EntityTimestampsTrait;
+
/** @Serializer\XmlAttribute */
/**
* @var int
*/
protected $config;
+ /**
+ * @var ArrayCollection
+ *
+ * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\SiteCredential", mappedBy="user", cascade={"remove"})
+ */
+ protected $siteCredentials;
+
/**
* @var ArrayCollection
*
$this->roles = ['ROLE_USER'];
}
- /**
- * @ORM\PrePersist
- * @ORM\PreUpdate
- */
- public function timestamps()
- {
- if (null === $this->createdAt) {
- $this->createdAt = new \DateTime();
- }
-
- $this->updatedAt = new \DateTime();
- }
-
/**
* Set name.
*