<?php

namespace App\Http\Resources;

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

class StationResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            "id"=>$this->id,
            "station_number"=>$this->station_no,
            "pic"=>$this->pic,
            "station_name"=>$this->station_name,
            "station_code"=>$this->station_code,
            "parent_id"=>$this->parent_id,
            'machine_type'=>$this->machine_type,
            "manufacturer_named"=>$this->manufacturer_named,
            "serial_number"=>$this->serial_number,
            "manufactured_date"=>$this->manufactured_date,
            "priority"=>$this->priority,
            "cycle_time"=>$this->cycle_time,
            "load_unload_time"=>$this->load_unload_time,
            "status"=>$this->status,
            "description_text"=>$this->description,
            "parent_info"=>$this->parent_info,
        ];
    }
}
