<?php

namespace App\Http\Requests\Payments;

use App\Http\Requests\ApiFormRequest;

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

    public function rules(): array
    {
        return [
            'parent_id' => ['required', 'integer', 'min:1'],
            'event_name' => ['required', 'string', 'max:255'],
            'description' => ['nullable', 'string', 'max:1000'],
            'amount' => ['required', 'numeric', 'min:0'],
            'semester' => ['required', 'string', 'max:50'],
            'school_year' => ['required', 'string', 'max:50'],
            'student_ids' => ['nullable', 'array'],
            'student_ids.*' => ['integer', 'min:1'],
            'student_id' => ['nullable', 'integer', 'min:1'],
        ];
    }
}
