Feature #17 : Module Permohonan
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user