Merge remote-tracking branch 'origin/tender' into staging
# Conflicts: # module.json # routes/breadcrumbs.php # routes/web.php
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Modules\Lpj\Database\Factories\BranchFactory;
|
||||
use Modules\Lpj\Database\Factories\BranchFactory;
|
||||
|
||||
class Branch extends Base
|
||||
class Branch extends Base
|
||||
{
|
||||
protected $table = 'branches';
|
||||
protected $fillable = ['code', 'name', 'status', 'authorized_at', 'authorized_status', 'authorized_by'];
|
||||
|
||||
public function debitures()
|
||||
{
|
||||
protected $table = 'branches';
|
||||
protected $fillable = ['code', 'name', 'status', 'authorized_at', 'authorized_status', 'authorized_by'];
|
||||
|
||||
public function debitures()
|
||||
{
|
||||
return $this->hasMany(Debiture::class, 'branch_id', 'id');
|
||||
}
|
||||
return $this->hasMany(Debiture::class, 'branch_id', 'id');
|
||||
}
|
||||
|
||||
public function kjpp()
|
||||
{
|
||||
return $this->belongsTo(KJPP::class);
|
||||
}
|
||||
}
|
||||
|
||||
24
app/Models/IjinUsaha.php
Normal file
24
app/Models/IjinUsaha.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class IjinUsaha extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'ijin_usaha';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['code', 'name'];
|
||||
|
||||
// relasi ke kjpp
|
||||
public function kjpp()
|
||||
{
|
||||
return $this->belongsTo(KJPP::class);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Modules\Lpj\Database\Factories\JenisAsetFactory;
|
||||
use Modules\Lpj\Database\Factories\JenisAsetFactory;
|
||||
|
||||
class JenisAset extends Base
|
||||
{
|
||||
protected $table = 'jenis_aset';
|
||||
protected $fillable = ['code', 'name'];
|
||||
}
|
||||
class JenisAset extends Base
|
||||
{
|
||||
protected $table = 'jenis_aset';
|
||||
protected $fillable = ['code', 'name'];
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
class JenisJaminan extends Base
|
||||
class JenisJaminan extends Base
|
||||
{
|
||||
protected $table = 'jenis_jaminan';
|
||||
protected $fillable = ['code', 'name', 'slug', 'jenis_legalitas_jaminan_id'];
|
||||
|
||||
// relasi ke kjpp
|
||||
public function kjpp()
|
||||
{
|
||||
protected $table = 'jenis_jaminan';
|
||||
protected $fillable = ['code', 'name','slug','jenis_legalitas_jaminan_id'];
|
||||
return $this->belongsTo(KJPP::class);
|
||||
}
|
||||
}
|
||||
|
||||
62
app/Models/KJPP.php
Normal file
62
app/Models/KJPP.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
// use Modules\Lpj\Database\Factories\KJPPFactory;
|
||||
|
||||
class KJPP extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
// Define the table if not using default table naming
|
||||
protected $table = 'kjpp';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'name',
|
||||
'jenis_kantor',
|
||||
'nomor_ijin_usaha',
|
||||
'province_code',
|
||||
'city_code',
|
||||
'district_code',
|
||||
'village_code',
|
||||
'address',
|
||||
'postal_code',
|
||||
'nomor_telepon_kantor',
|
||||
'email_kantor',
|
||||
'nama_pimpinan',
|
||||
'nomor_hp_pimpinan',
|
||||
'nama_pic_reviewer',
|
||||
'nomor_hp_pic_reviewer',
|
||||
'nama_pic_admin',
|
||||
'nomor_hp_pic_admin',
|
||||
'nama_pic_marketing',
|
||||
'nomor_hp_pic_marketing',
|
||||
'ijin_usaha_id',
|
||||
'jenis_aset_id',
|
||||
'attachment'
|
||||
];
|
||||
|
||||
// relasi ke branch
|
||||
public function branch()
|
||||
{
|
||||
return $this->hasOne(Branch::class, 'jenis_kantor');
|
||||
}
|
||||
|
||||
// relasi ke jenis aset
|
||||
public function jenis_aset()
|
||||
{
|
||||
return $this->hasMany(JenisJaminan::class, 'jenis_aset_id');
|
||||
}
|
||||
|
||||
// relasi ke ijin usaha
|
||||
public function ijin_usaha()
|
||||
{
|
||||
return $this->hasMany(IjinUsaha::class, 'ijin_usaha_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user