<?php

namespace App\Classes\Modules\PackingLists\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackingListObject;
use App\Models\PackingList;

class UpdatesPackingList extends AbstractUpdateRecord
{

    /**
     * @param PackingList $model
     * @param PackingListObject $object
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(PackingList $model, PackingListObject $object) {

        $model->reference = $object->getReference();
        $model->status = $object->getStatus();

        return $this->handler($model);

    }
}
