<?php

namespace App\Http\Requests\Parents;

use App\Http\Requests\ApiFormRequest;

class ParentAttendanceReportSubmitRequest extends ApiFormRequest
{
    public function rules(): array
    {
        return [
            'student_ids' => ['required', 'array'],
            'student_ids.*' => ['integer', 'min:1'],
            'date' => ['nullable', 'date'],
            'dates' => ['nullable', 'array'],
            'dates.*' => ['date'],
            'type' => ['required', 'in:absent,late,early_dismissal'],
            'arrival_time' => ['nullable', 'string'],
            'dismiss_time' => ['nullable', 'string'],
            'reason' => ['nullable', 'string'],
        ];
    }
}
