<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Instansi extends Model
{
    use HasFactory;

    protected $table = 'md_instansi';

    protected $fillable = [
        'nama',
        'kuota',
    ];

    public function bidangs()
    {
        return $this->hasMany(Bidang::class, 'instansi_id');
    }

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