$this->workspace->id, 'workspace_name' => $this->workspace->name, 'workspace_slug' => $this->workspace->slug, 'feature_code' => $this->feature->code, 'feature_name' => $this->feature->name, 'used' => $this->used, 'limit' => $this->limit, 'percentage' => round(($this->used / $this->limit) * 100), 'remaining' => max(0, $this->limit - $this->used), 'threshold' => $this->threshold, ]; } public function message(): string { $percentage = round(($this->used / $this->limit) * 100); return "Usage warning: {$this->feature->name} at {$percentage}% ({$this->used}/{$this->limit}) for workspace {$this->workspace->name}"; } }