<?php

namespace App\Http\Requests\Attendance;

use Illuminate\Foundation\Http\FormRequest;

class UpdateAttendanceManagementRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'class_section_id' => ['required', 'integer'],
            'student_id' => ['required', 'integer'],
            'school_id' => ['nullable', 'string'],
            'status' => ['required', 'in:present,absent,late'],
            'date' => ['required', 'date'],
            'reason' => ['nullable', 'string'],
            'class_id' => ['nullable', 'integer'],
            'semester' => ['nullable', 'string'],
            'school_year' => ['nullable', 'string'],
            'is_reported' => ['nullable'],
        ];
    }
}