<?php

namespace App\Classes\Modules\PackingLists\Services\Packages;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackageObject;
use App\Models\Package;

class UpdatesPackage extends AbstractUpdateRecord
{
    public function execute(Package $model, PackageObject $object) {

        $model->type = $object->getType();
        $model->description = $object->getDescription();
        $model->width = $object->getWidth();
        $model->height = $object->getHeight();
        $model->length = $object->getLength();
        $model->weight = $object->getWeight();
        $model->quantity = $object->getQuantity();
        $model->status = $object->getStatus();

        return $this->handler($model);

    }
}
