<?php

namespace App\Http\Resources;

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

class CobroTdtCFP extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'idCobroCFP'        => strval($this->idCobroCFP),
            'idCobro'           => strval($this->idCobro),
            'idDT'              => strval($this->idDT),
            'idCFP'             => strval($this->idCFP),
            'idCuota'           => strval($this->idCuota),
            'montoCFP'          => number_format($this->montoCFP, 2, ',', '.'),
            'montoDT'           => number_format($this->montoDT, 2, ',', '.'),
            'idMonedaDT'        => $this->idMonedaDT,
            'idTC'              => strval($this->idTC),
        ];
    }
}
