49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Modules\Writeoff\Entities;
|
|
|
|
class Rekening extends BaseModel
|
|
{
|
|
protected $table = 'rekening';
|
|
protected $fillable = [
|
|
'branch_id',
|
|
'debitur_id',
|
|
'loan_type_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');
|
|
}
|
|
|
|
}
|