37 lines
791 B
PHP
37 lines
791 B
PHP
<?php
|
|
|
|
namespace App\Models\Verifikator;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PaguRiwayat extends Model
|
|
{
|
|
public const JENIS_PENAMBAHAN = 'penambahan';
|
|
public const JENIS_PENGURANGAN = 'pengurangan';
|
|
|
|
protected $table = 'verifikator.pagu_riwayats';
|
|
protected $fillable = [
|
|
'pagu_id',
|
|
'unit_pembayaran_id',
|
|
'tahun',
|
|
'semester',
|
|
'jenis',
|
|
'jumlah',
|
|
'saldo_sebelum',
|
|
'saldo_sesudah',
|
|
'keterangan',
|
|
'created_by_nip',
|
|
'created_by_nama',
|
|
];
|
|
protected $casts = [
|
|
'jumlah' => 'float',
|
|
'saldo_sebelum' => 'float',
|
|
'saldo_sesudah' => 'float',
|
|
];
|
|
|
|
public function pagu()
|
|
{
|
|
return $this->belongsTo(Pagu::class, 'pagu_id', 'id');
|
|
}
|
|
}
|