<?php

namespace App\Http\Resources;

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

class CosumtionResource 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,
            "user_id"=>$this->user_id,
            "part_code"=>$this->part_code,
            "qty"=>$this->qty,
            "unit"=>$this->unit,
            "date"=>$this->date,
            "station_code"=>$this->station_code,
            "description"=>$this->description,
        ];
    }
}
