<?php

namespace App\Http\Requests;

use App\Models\Hodnotenie\HodnotenieEnum;
use Illuminate\Foundation\Http\FormRequest;
use Spatie\Enum\Laravel\Http\EnumRequest;
use Spatie\Enum\Laravel\Http\Requests\TransformsEnums;

/**
 * Class HodnotenieZaznamuRequest
 */
final class HodnotenieZaznamuRequest extends FormRequest
{
    use TransformsEnums;

    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'hodnotenie' => 'required',
        ];
    }

    /**
     * @return string[]
     */
    public function enums(): array
    {
        return [
            EnumRequest::REQUEST_REQUEST => [
                'hodnotenie' => HodnotenieEnum::class,
            ],
        ];
    }
}
