<?php

declare(strict_types=1);

namespace Seka\Vzdelavanie\Http\Requests\Api;

use Illuminate\Validation\Rule;
use Illuminate\Foundation\Http\FormRequest;
use Seka\Vzdelavanie\Models\Pouzivatel\Kniznica\OblubeneModelTypeEnum;

/**
 * Class OblubeneStoreRequest
 *
 * @package Seka\Vzdelavanie\Http\Requests\Api
 */
class OblubeneStoreRequest extends FormRequest
{
    /**
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * @return array
     */
    public function rules()
    {
        return [
            'id' => 'required|integer',
            'typ' => [
                'required',
                Rule::in([
                    OblubeneModelTypeEnum::MODEL_TYPE_SEKCIA(),
                    OblubeneModelTypeEnum::MODEL_TYPE_UCEBNICA(),
                ]),
            ]
        ];
    }
}
