uuid = Uuid::v4()->toRfc4122(); $this->record = $record; $this->title = $title; $this->body = $body; $this->createdAt = time(); $this->recordedAt = $recordedAt ?? $this->createdAt; } public function getId(): ?int { return $this->id; } public function getUuid(): string { return $this->uuid; } public function getRecord(): PatientRecord { return $this->record; } public function setTitle(string $v): self { $this->title = $v; return $this; } public function setBody(?string $v): self { $this->body = $v; return $this; } public function setRecordedAt(int $v): self { $this->recordedAt = $v; return $this; } public function toArray(): array { return [ 'uuid' => $this->uuid, 'title' => $this->title, 'body' => $this->body, 'recorded_at' => $this->recordedAt, 'created_at' => $this->createdAt, ]; } }