<?php

namespace App\Http\Requests\Staff;

use App\Http\Requests\ApiFormRequest;

class StaffIndexRequest extends ApiFormRequest
{
    public function rules(): array
    {
        return [
            'page' => ['nullable', 'integer', 'min:1'],
            'per_page' => ['nullable', 'integer', 'min:1', 'max:100'],
            'role' => ['nullable', 'string', 'max:100'],
            'school_year' => ['nullable', 'string', 'max:20'],
            'semester' => ['nullable', 'string', 'max:20'],
            'sort_by' => ['nullable', 'in:created_at,lastname,firstname'],
            'sort_dir' => ['nullable', 'in:asc,desc'],
        ];
    }
}
