<?php

namespace App\Classes\Modules\Banks\Services;

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

class SetsBankToDefault extends AbstractUpdateRecord
{

    /**
     * @param Bank $model
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Bank $model)
    {
        $model->default = true;

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