<?php

namespace App\Http\Requests\Finance;

use App\Http\Requests\ApiFormRequest;

class FinancialReportRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'date_from' => ['nullable', 'date_format:Y-m-d'],
            'date_to' => ['nullable', 'date_format:Y-m-d', 'after_or_equal:date_from'],
            'school_year' => ['nullable', 'string', 'max:20'],
        ];
    }
}
