|
@@ -15,6 +15,60 @@ use FOS\UserBundle\Entity\User as AbstractedUser;
|
|
|
|
|
|
class BaseUser extends AbstractedUser
|
|
|
{
|
|
|
+ protected $createdAt;
|
|
|
+
|
|
|
+ protected $updatedAt;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Set createdAt
|
|
|
+ *
|
|
|
+ * @param \DateTime $createdAt
|
|
|
+ */
|
|
|
+ public function setCreatedAt(\DateTime $createdAt = null)
|
|
|
+ {
|
|
|
+ $this->createdAt = $createdAt;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get createdAt
|
|
|
+ *
|
|
|
+ * @return \DateTime $createdAt
|
|
|
+ */
|
|
|
+ public function getCreatedAt()
|
|
|
+ {
|
|
|
+ return $this->createdAt;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Set updatedAt
|
|
|
+ *
|
|
|
+ * @param \DateTime $updatedAt
|
|
|
+ */
|
|
|
+ public function setUpdatedAt(\DateTime $updatedAt = null)
|
|
|
+ {
|
|
|
+ $this->updatedAt = $updatedAt;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get updatedAt
|
|
|
+ *
|
|
|
+ * @return \DateTime $updatedAt
|
|
|
+ */
|
|
|
+ public function getUpdatedAt()
|
|
|
+ {
|
|
|
+ return $this->updatedAt;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function prePersist()
|
|
|
+ {
|
|
|
+ $this->createdAt = new \DateTime;
|
|
|
+ $this->updatedAt = new \DateTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function preUpdate()
|
|
|
+ {
|
|
|
+ $this->updatedAt = new \DateTime;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* @return \DateTime
|