id = Uuid::v4(); $this->createdAt = new \DateTimeImmutable(); $this->versions = new ArrayCollection(); } public function getId(): Uuid { return $this->id; } public function getCreatedAt(): \DateTimeImmutable { return $this->createdAt; } public function getTitle(): string { return $this->title; } public function setTitle(string $title): static { $this->title = $title; return $this; } public function getStatus(): string { return $this->status; } public function archive(): void { $this->status = self::STATUS_ARCHIVED; } public function getCreatedBy(): User { return $this->createdBy; } public function setCreatedBy(User $user): static { $this->createdBy = $user; return $this; } public function getVersions(): Collection { return $this->versions; } public function addVersion(DocumentVersion $version): void { $this->versions->add($version); $version->setDocument($this); } public function setCurrentVersion(?DocumentVersion $version): void { $this->currentVersion = $version; } public function getCurrentVersion(): ?DocumentVersion { return $this->currentVersion; } }