<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class ScheduleInterviewRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true; // Allow authenticated users (will check permissions in controller)
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
     */
    public function rules(): array
    {
        return [
            'application_id' => 'required|integer|exists:applications,id',
            'interview_date' => 'required|date|after:today',
            'interview_time' => 'required|date_format:H:i',
            'location' => 'nullable|string|max:255',
            'interview_type' => 'required|in:phone,video,in_person,online',
            'notes' => 'nullable|string|max:1000',
        ];
    }
}
