first commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\DokSiremun;
|
||||
|
||||
use App\Models\Verifikator\Pagu;
|
||||
use App\Models\Verifikator\PenambahanPagu;
|
||||
use App\Models\Verifikator\Pobo;
|
||||
use App\Models\Verifikator\Rasio;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class UnitKerja extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'public.unit_kerjas';
|
||||
|
||||
function rasios()
|
||||
{
|
||||
return $this->hasMany(Rasio::class);
|
||||
}
|
||||
|
||||
function pagus()
|
||||
{
|
||||
return $this->hasMany(Pagu::class, 'unit_pembayaran_id');
|
||||
}
|
||||
|
||||
function pagu()
|
||||
{
|
||||
return $this->hasOne(Pagu::class, 'unit_pembayaran_id');
|
||||
}
|
||||
|
||||
function pobo()
|
||||
{
|
||||
return $this->hasOne(Pobo::class, 'unit_kerja_id', 'id');
|
||||
}
|
||||
|
||||
function penambahanPagu()
|
||||
{
|
||||
return $this->hasMany(PenambahanPagu::class, 'unit_kerja_id', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user