<?php

namespace App\Classes\Modules\Companies\Services;

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

class UpdatesCompanyStatus extends AbstractUpdateRecord
{

    /**
     * @param Company $model
     * @param int $status
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Company $model, int $status)
    {

        $model->status = $status;
        return $this->handler($model);

    }
}