<?php

namespace App\Http\Requests\Api;

use Illuminate\Foundation\Http\FormRequest;

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

    /**
     * @return array<string, array<int, string>>
     */
    public function rules(): array
    {
        return [
            'roleid' => ['required', 'integer', 'min:1'],
        ];
    }

    public function getRoleId(): int
    {
        return (int) $this->validated('roleid');
    }
}
