<?php

namespace App\Http\Requests\Attendance;

use Illuminate\Foundation\Http\FormRequest;

class AdminAddAttendanceEntryRequest 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' => ['nullable', 'date'],
            'reason' => ['nullable', 'string'],
            'class_id' => ['nullable', 'integer'],
            'is_reported' => ['nullable', 'in:yes,no'],
        ];
    }
}