<?php 

namespace App\Http\Resources\Bond;

use Illuminate\Http\Resources\Json\JsonResource;
use App\Http\Resources\BaseJsonResource;

class BondProcessResource extends BaseJsonResource
{
    public function toArray($request)
    {

        $array = [
            'id' => $this->id,
            'name' => $this->name,
            'proc_type' => $this->proc_type,
            'mixing_detail' => $this->getTranslations('mixing_detail'),
            'hotpress_detail' =>  $this->getTranslations('hotpress_detail'),
            'finishing_detail' => $this->getTranslations('finishing_detail'),
            'other_detail' => $this->getTranslations('other_detail'),
            'cycle_time' => $this->cycle_time,
            'expected_mould_per_hour' => $this->expected_mould
        ];

        $array = $this->base($array);
        
        return $array;
    }
}