<?php

namespace App\Http\Resources;

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

class Trans extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            "idT"           => strval($this->idT),
            "ctaT"          => $this->ctaT,
            "dateT"         => date("d/m/Y",strtotime($this->dateT)),
            "typeT"         => $this->typeT,
            "nameTypeT"     => $this->nameTypeT,
            "refT"          => $this->refT,
            "descT"         => $this->descT,
            "enableT"       => $this->enableT,
            "idU"           => $this->idU,
        ];
    }
}
