$this->id, 'partner_agreement_id' => $this->partner_agreement_id, 'partner_agreement' => $this->whenLoaded('partnerAgreement', fn() => new PartnerAgreementResource($this->partnerAgreement)), 'service_number' => $this->service_number, 'name' => $this->name, 'description' => $this->description, 'category_id' => $this->category_id, 'category' => $this->whenLoaded('category', fn() => new CategoryResource($this->category)), 'price' => $this->price, 'associate_price' => $this->associate_price, 'supplier_price' => $this->supplier_price, 'requires_scheduling' => $this->requires_scheduling, 'status' => $this->status, 'media' => $this->whenLoaded('media', fn() => MediaResource::collection($this->media)), 'created_at' => Carbon::parse($this->created_at)->format('Y-m-d H:i:s'), 'updated_at' => Carbon::parse($this->updated_at)->format('Y-m-d H:i:s'), ]; } }