<?php

namespace App\Classes\Modules\Bookings\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\Bookings\DataTransferObjects\BookingObject;
use App\Models\Booking;

class UpdatesBookingFixedAmount extends AbstractUpdateRecord
{

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