<?php

namespace App\Models;

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

class Unit extends Model
{
    public $incrementing = false;
    protected $table = 'ms_unit';

    protected $fillable = [
        'id',
        'idsatker',
        'idparentsatker',
        'namasatker',
        'status',
        'created_at',
        'updated_at',
        'deleted_at',
    ];

    public function rAgenda()
    {
        return $this->hasMany(Agenda::class, 'idunit', 'id');
    }

    public function rPegawai()
    {
        return $this->hasMany(Pegawai::class, 'idunit', 'id');
    }
}
