<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class ClerksResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'location_code' => $this->location_code,
            'location_name' => $this->locations->storage_location_name,
            'counting_status' => ucfirst($this->stock_takes->counting_status),
            'team' => $this->team,
            'team_lead' => $this->team_lead
        ];
    }
}