<?php

namespace App\Http\Requests\Admin;

use App\Http\Requests\ApiFormRequest;

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

    /** @return array<string, mixed> */
    public function rules(): array
    {
        return [
            'admin_site_id' => ['required', 'integer', 'exists:admin_sites,id'],
            'period_start' => ['required', 'date'],
            'period_end' => ['required', 'date', 'after:period_start'],
        ];
    }
}
