updatedAt = $this->createdAt = new \DateTime(); } /** * Set updatedAt * * @PreUpdate */ public function _preUpdate() { $this->updatedAt = new \DateTime(); } /** * @return int */ public function getId() { return (int)$this->id; } /** * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * @return \DateTime */ public function getUpdatedAt() { return $this->updatedAt; } }