uuid = Uuid::v4()->toRfc4122(); $this->claimId = $claimId; $this->fromStatus = $fromStatus; $this->toStatus = $toStatus; $this->createdAt = time(); } public function getId(): ?int { return $this->id; } public function getClaimId(): int { return $this->claimId; } public function getToStatus(): string { return $this->toStatus; } public function setNote(?string $note): self { $this->note = $note !== null && trim($note) !== '' ? trim($note) : null; return $this; } public function setActor(?int $userId, ?string $name): self { $this->createdById = $userId; $this->createdByName = $name; return $this; } public function setCreatedAt(int $at): self { $this->createdAt = $at; return $this; } public function toArray(): array { return [ 'uuid' => $this->uuid, 'from_status' => $this->fromStatus, 'to_status' => $this->toStatus, 'note' => $this->note, 'by' => $this->createdByName, 'at' => $this->createdAt, ]; } }