uuid = Uuid::v4()->toRfc4122(); $this->appointment = $appointment; $this->type = $type; $this->title = $title; $this->createdAt = time(); } public function setActor(?int $userId, ?string $name): self { $this->actorUserId = $userId; $this->actorName = $name; return $this; } public function setReason(?string $reason): self { $this->reason = $reason; return $this; } public function getUuid(): string { return $this->uuid; } public function toArray(): array { return [ 'uuid' => $this->uuid, 'type' => $this->type, 'title' => $this->title, 'actor_name' => $this->actorName, 'reason' => $this->reason, 'created_at' => $this->createdAt, ]; } }