<?php

namespace App\Modules\HR\Attendance\Models;

use App\Modules\Admin\Tenancy\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;

class AttendancePolicy extends Model
{
    use BelongsToTenant;

    protected $table = 'hr_attendance_policies';

    protected $guarded = ['id'];

    protected function casts(): array
    {
        return [
            'allowed_ips' => 'array',
            'enable_early_leave_detection' => 'boolean',
            'enable_ip_restriction' => 'boolean',
            'ramadan_enabled' => 'boolean',
            'flexible_hours_enabled' => 'boolean',
            'ramadan_start_date' => 'date',
            'ramadan_end_date' => 'date',
        ];
    }
}
