<?php

namespace App\Classes\Modules\PackingLists\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\PackingLists\DataTransferObjects\ItemObject;
use App\Models\Item;

class UpdatesItem extends AbstractUpdateRecord
{
    public function execute(Item $model, ItemObject $object) {

        $model->name = $object->getName();
        $model->reference = $object->getReference();
        $model->description = $object->getDescription();
        $model->quantity = $object->getQuantity();
        $model->uom = $object->getUom();
        $model->price = $object->getPrice();
        $model->total = $object->getTotal();
        $model->status = $object->getStatus();

        return $this->handler($model);

    }
}
