public function prePersist() { $this->createdAt = new \DateTime(); $this->updatedAt = new \DateTime(); }