<?php

namespace App\Modules\HR\Recruitment\Requests;

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

class UpdateInterviewScorecardRequest extends StoreInterviewScorecardRequest
{
    public function authorize(): bool
    {
        $row = $this->route('scorecard');

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