*/ public function toArray(Request $request): array { return [ 'uuid' => $this->uuid, 'status' => $this->status->value, 'status_label' => $this->status->label(), 'error_message' => $this->error_message, 'download_url' => $this->output_path ? route('api.generations.download', $this->uuid) : null, 'created_at' => $this->created_at?->toIso8601String(), ]; } }