<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Instansi extends Model
{
    protected $fillable = [
        'nama_instansi',
        'alamat',
        'latitude',
        'longitude',
        'radius_meter',
    ];

    public function karyawans()
    {
        return $this->hasMany(Karyawan::class);
    }

    public function users()
    {
        return $this->hasMany(User::class);
    }

    public function jamKerja()
    {
        return $this->hasOne(JamKerja::class);
    }

    public function user()
{
    return $this->hasOne(User::class);
}
}