<?php

namespace App\Http\Requests\TicketIncidentType;

use Illuminate\Foundation\Http\FormRequest;

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

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