<?php

namespace App\Modules\HR\Recruitment\Requests;

use App\Modules\HR\Recruitment\Models\RecruitmentVacancy;

class UpdateVacancyRequest extends StoreVacancyRequest
{
    public function authorize(): bool
    {
        $row = $this->route('vacancy');

        return $row instanceof RecruitmentVacancy
            && ($this->user()?->can('update', $row) ?? false);
    }
}
