23 lines
636 B
PHP
23 lines
636 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class MappingUnitKerjaPegawai extends Model
|
|
{
|
|
protected $connection = 'dbDirectory';
|
|
protected $table = 'public.mappegawaijabatantounitkerja_m';
|
|
public $timestamps = false;
|
|
protected $primaryKey = 'id';
|
|
protected $guarded = ['id'];
|
|
protected $with = ['unitKerja', 'subUnitKerja'];
|
|
|
|
public function unitKerja(){
|
|
return $this->belongsTo(UnitKerja::class, 'objectunitkerjapegawaifk', 'id');
|
|
}
|
|
public function subUnitKerja(){
|
|
return $this->belongsTo(SubUnitKerja::class, 'objectsubunitkerjapegawaifk', 'id');
|
|
}
|
|
}
|