Merge branch 'master' of https://git.putrakuningan.com/daengdeni/lpj into andydev
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
protected $table = 'dokumen_jaminan';
|
||||
protected $fillable = [
|
||||
'debiture_id',
|
||||
'permohonan_id',
|
||||
'pemilik_jaminan_id',
|
||||
'jenis_jaminan_id',
|
||||
'jenis_legalitas_jaminan_id',
|
||||
@@ -66,4 +67,8 @@
|
||||
public function jenisLegalitasJaminan(){
|
||||
return $this->belongsTo(JenisLegalitasJaminan::class, 'jenis_legalitas_jaminan_id', 'id');
|
||||
}
|
||||
|
||||
public function permohonan(){
|
||||
return $this->belongsTo(Permohonan::class, 'permohonan_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
45
app/Models/Permohonan.php
Normal file
45
app/Models/Permohonan.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Lpj\Database\Factories\PermohonanFactory;
|
||||
use Modules\Usermanagement\Models\User;
|
||||
|
||||
class Permohonan extends Base
|
||||
{
|
||||
protected $table = 'permohonan';
|
||||
protected $fillable = [
|
||||
'nomor_registrasi',
|
||||
'tanggal_permohonan',
|
||||
'user_id',
|
||||
'branch_id',
|
||||
'tujuan_penilaian_id',
|
||||
'debiture_id',
|
||||
'status',
|
||||
'authorized_at',
|
||||
'authorized_status',
|
||||
'authorized_by',
|
||||
];
|
||||
|
||||
public function user(){
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function branch(){
|
||||
return $this->belongsTo(Branch::class);
|
||||
}
|
||||
|
||||
public function tujuanPenilaian(){
|
||||
return $this->belongsTo(TujuanPenilaian::class);
|
||||
}
|
||||
|
||||
public function debiture(){
|
||||
return $this->belongsTo(Debiture::class);
|
||||
}
|
||||
|
||||
public function documents(){
|
||||
return $this->hasMany(DokumenJaminan::class);
|
||||
}
|
||||
}
|
||||
9
app/Models/StatusPermohonan.php
Normal file
9
app/Models/StatusPermohonan.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
class StatusPermohonan extends Base
|
||||
{
|
||||
protected $table = 'status_permohonan';
|
||||
protected $fillable = ['name', 'description','status','slug'];
|
||||
}
|
||||
Reference in New Issue
Block a user