Writeoff/Entities/Rekening.php
2023-12-14 16:59:57 +07:00

49 lines
1.1 KiB
PHP

<?php
namespace Modules\Writeoff\Entities;
class Rekening extends BaseModel
{
protected $table = 'rekening';
protected $fillable = [
'branch_id',
'debitur_id',
'product_id',
'currency_id',
'nomor_rekening',
'status_rekening',
'status',
'limit_ref',
'registered_at',
'authorized_at',
'authorized_status',
'authorized_by',
];
public function branch()
{
return $this->belongsTo(Branch::class);
}
public function debitur()
{
return $this->belongsTo(Debitur::class);
}
public function loan_type()
{
return $this->belongsTo(LoanType::class);
}
public function currency()
{
return $this->belongsTo(Currency::class);
}
public function hapusBuku()
{
return $this->hasOne(HapusBuku::class,'nomor_pinjaman','nomor_rekening');
}
}