<?php

namespace App\Http\Resources\TicketType;

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

class TicketTypeResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'code' => $this->code,
            'name' => $this->name,
            'need_approval' => $this->need_approval,
            'sla_minutes' => $this->sla_minutes,
            'require_photo' => $this->require_photo,
            'require_material' => $this->require_material,
            'need_customer' => $this->need_customer,
            'need_incident_type' => $this->need_incident_type,
            'created_at' => $this->created_at,
            'updated_at' => $this->updated_at,
        ];
    }
}
