<?php

namespace App\Modules\HR\EmployeeSelfService\Requests;

use Illuminate\Foundation\Http\FormRequest;

class SelfAttendancePunchRequest extends FormRequest
{
    public function authorize(): bool
    {
        $user = $this->user();

        return $user !== null
            && ! $user->isAdmin()
            && $user->tenant_id !== null
            && $user->employee_id !== null;
    }

    /**
     * @return array<string, mixed>
     */
    public function rules(): array
    {
        return [];
    }
}
