<?php

namespace App\Http\Resources\Finance;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class FinancialPaymentResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'invoice_id' => (int) ($this->resource['invoice_id'] ?? 0),
            'paid_amount' => (float) ($this->resource['paid_amount'] ?? 0),
        ];
    }
}
