<?php

namespace App\Http\Requests\Attendance;

use Illuminate\Foundation\Http\FormRequest;

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

    public function rules(): array
    {
        return [
            'user_id' => 'nullable|integer|exists:users,id',
            'check_in' => 'nullable|date_format:H:i:s',
            'gps_data' => 'nullable|array',
            'gps_data.latitude' => 'nullable|numeric',
            'gps_data.longitude' => 'nullable|numeric',
            'gps_data.accuracy' => 'nullable|numeric',
        ];
    }
}
