id = new Id(); $this->email = $email; $this->createdAt = new DateTime(); $this->workspace = $workspace; } public function getId(): Id { return $this->id; } public function getEmail(): Email { return $this->email; } public function getCreatedAt(): DateTimeInterface { return $this->createdAt; } public function getUpdatedAt(): ?DateTimeInterface { return $this->updatedAt; } #[ORM\PreUpdate] public function setUpdatedAt(): void { $this->updatedAt = new DateTime(); } public function getWorkspace(): WorkspaceEntity { return $this->workspace; } }