public function prePersist() { $this->setCreatedAt(new \DateTime()); $this->setUpdatedAt(new \DateTime()); }