uuid = Uuid::v4()->toRfc4122(); $this->serviceItem = $serviceItem; $this->field = $field; $this->operation = $operation; $this->createdAt = time(); } public function setActor(?int $userId, ?string $name): self { $this->actorUserId = $userId; $this->actorName = $name; return $this; } public function setValues(?string $old, ?string $new): self { $this->oldValue = $old; $this->newValue = $new; return $this; } public function getUuid(): string { return $this->uuid; } public function toArray(): array { return [ 'uuid' => $this->uuid, 'field' => $this->field, 'operation' => $this->operation, 'old_value' => $this->oldValue, 'new_value' => $this->newValue, 'actor_name' => $this->actorName, 'created_at' => $this->createdAt, ]; } }