<?php

namespace App\Classes\Modules\Bookings\Services;

use App\Classes\General\Eloquent\AbstractDeleteRecord;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Models\Booking;

class RestoresBooking extends AbstractUpdateRecord
{

    /**
     * @param Booking $model
     * @return mixed
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Booking $model) {

        $model->status = ApprovalStatus::APPROVED;

        return $this->handler($model);
    }
}