<?php

namespace App\Modules\HR\Recruitment\Requests;

use App\Modules\HR\Employees\Enums\EmployeeDocumentType;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class StoreOnboardingEmployeeDocumentRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    /** @return array<string, mixed> */
    public function rules(): array
    {
        return [
            'type' => ['required', Rule::in(EmployeeDocumentType::values())],
            'document' => ['required', 'file', 'max:10240'],
            'expires_at' => ['nullable', 'date'],
        ];
    }
}
