<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ItemResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'package_id' => $this->package_id,
            'name' => $this->name,
            'reference' => $this->reference,
            'description' => $this->description,
            'quantity' => $this->quantity,
            'uom' => $this->uom,
            'price' => $this->price,
            'total' => $this->total,
            'status' => $this->status,
        ];
    }
}
