<?php

namespace App\Classes\Modules\Transactions\Services;

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

class UpdatesTransactionStatus extends AbstractUpdateRecord
{

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