<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Vzdelavanie\Http\Requests\Sprava\Testovanie\Test;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
use Seka\Portal\Modul\Vzdelavanie\Enums\ModelStatusEnum;

/**
 * Class TestStoreRequest
 *
 * @package Seka\Portal\Modul\Vzdelavanie\Http\Requests\Sprava\Testovanie\Test
 */
final class TestStoreRequest extends FormRequest
{
    /**
     * @return array
     */
    public function rules(): array
    {
        return [
            'nazov' => 'required|min:1|max:255',
            'popis' => 'max:1024',
            'pocet_otazok' => 'required|integer|min:1|max:100',
            'stav' => [
                'required',
                Rule::enum(ModelStatusEnum::class),
            ],
        ];
    }
}
