<?php

namespace App\Modules\HR\Recruitment\Requests;

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

class UpdateJobRequestRequest extends StoreJobRequestRequest
{
    public function authorize(): bool
    {
        $row = $this->route('job_request');

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