<?php

namespace App\Classes\Modules\Bookings\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Models\Booking;

class UpdatesBookingOwner extends AbstractUpdateRecord
{

    /**
     * @param Booking $model
     * @param int $id
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Booking $model, int $id)
    {
        $model->company_id = $id;
        return $this->handler($model);
    }
}