<?php

namespace App\Classes\Modules\Orders\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\Orders\DataTransferObjects\OrderObject;
use App\Models\PackingList;

class UpdateOwnerReference extends AbstractUpdateRecord
{
    public function execute(string $reference, Object $owner)
    {
        foreach($owner as $owner) {
            PackingList::where('reference',$reference)->update(['owner_id' => $owner->id]);
        }
    }
}
