<?php

namespace App\Http\Requests\TicketType;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            /** Kata kunci untuk mencari kode atau nama tipe ticket. */
            'search' => ['nullable', 'string', 'max:255'],
            /** Nomor halaman yang ingin diambil. */
            'page' => ['nullable', 'integer', 'min:1'],
            /** Jumlah data per halaman, maksimal 100. */
            'per_page' => ['nullable', 'integer', 'min:1', 'max:100'],
        ];
    }
}
