36 lines
690 B
PHP
36 lines
690 B
PHP
<?php
|
|
|
|
namespace App\Models\Verifikator;
|
|
|
|
use App\Models\DokSiremun\UnitKerja;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Rasio extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'verifikator.rasios';
|
|
protected $fillable = [
|
|
'unit_kerja_id',
|
|
'periode',
|
|
'rasio',
|
|
'paid_at',
|
|
];
|
|
|
|
function unit()
|
|
{
|
|
return $this->belongsTo(UnitKerja::class);
|
|
}
|
|
|
|
function pagus()
|
|
{
|
|
return $this->hasMany(Pagu::class, 'unit_pembayaran_id');
|
|
}
|
|
|
|
function penambahanPagu()
|
|
{
|
|
return $this->hasMany(PenambahanPagu::class, 'unit_kerja_id', 'id');
|
|
}
|
|
}
|