createdAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): static { $this->user = $user; return $this; } public function getMessage(): ?string { return $this->message; } public function setMessage(string $message): static { $this->message = $message; return $this; } public function isRead(): bool { return $this->read; } public function setRead(bool $read): static { $this->read = $read; return $this; } public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; } }