Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender
This commit is contained in:
@@ -10,10 +10,12 @@ class GolonganMasySekitar extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'gol_mas_sekitar';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [];
|
||||
protected $fillable = ['code', 'name', 'status'];
|
||||
|
||||
|
||||
protected static function newFactory(): GolonganMasySekitarFactory
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ class KondisiBangunan extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [];
|
||||
protected $fillable = ['code','name'];
|
||||
|
||||
protected static function newFactory(): KondisiBangunanFactory
|
||||
{
|
||||
|
||||
23
app/Models/Lantai.php
Normal file
23
app/Models/Lantai.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Lpj\Database\Factories\LokasiUnitFactory;
|
||||
|
||||
class Lantai extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'lantai';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['name', 'code', 'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_by', 'updated_by', 'deleted_by'];
|
||||
|
||||
protected static function newFactory(): LokasiUnitFactory
|
||||
{
|
||||
//return LokasiUnitFactory::new();
|
||||
}
|
||||
}
|
||||
@@ -32,9 +32,9 @@ class PenawaranTender extends Model
|
||||
}
|
||||
|
||||
// menambahkan relasi tujuan penilaian KJPP
|
||||
public function tujuanPenilaianKJPP()
|
||||
public function tujuanPenilaianKjpp()
|
||||
{
|
||||
return $this->hasMany(TujuanPenilaianKJPP::class, 'id', 'tujuan_penilaian_kjpp_id');
|
||||
return $this->belongsTo(TujuanPenilaianKJPP::class, 'tujuan_penilaian_kjpp_id','id');
|
||||
}
|
||||
|
||||
public function permohonan()
|
||||
@@ -46,4 +46,6 @@ class PenawaranTender extends Model
|
||||
{
|
||||
return $this->belongsTo(JenisLaporan::class, 'jenis_laporan_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class Penilaian extends Model
|
||||
*/
|
||||
protected $table = 'penilaian';
|
||||
protected $fillable = [
|
||||
'jenis_penilaian_id', 'teams_id', 'tanggal_kunjungan', 'keterangan','nomor_registrasi','penilaian_id','surveyor_id','penilai_surveyor_id',
|
||||
'jenis_penilaian_id', 'penilaian_id', 'tanggal_kunjungan', 'keterangan','nomor_registrasi',
|
||||
'status', 'authorized_status', 'authorized_at', 'authorized_by', 'created_at',
|
||||
'created_by', 'updated_at', 'updated_by', 'deleted_at', 'deleted_by'
|
||||
];
|
||||
@@ -39,23 +39,12 @@ class Penilaian extends Model
|
||||
|
||||
public function userPenilai()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'penilaian_id', 'id');
|
||||
return $this->hasMany(PenilaianTeam::class, 'penilaian_id', 'id');
|
||||
}
|
||||
|
||||
public function userSurveyor()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'surveyor_id', 'id');
|
||||
}
|
||||
|
||||
public function userPenilaiSurveyor()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'penilai_surveyor_id', 'id');
|
||||
}
|
||||
|
||||
public function permohonan()
|
||||
{
|
||||
return $this->belongsTo(Permohonan::class, 'nomor_registrasi', 'nomor_registrasi');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
39
app/Models/PenilaianTeam.php
Normal file
39
app/Models/PenilaianTeam.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Lpj\Database\Factories\PenilaianTeamFactory;
|
||||
|
||||
class PenilaianTeam extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'penilaian_team';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['penilaian_id', 'team_id', 'user_id','role'];
|
||||
|
||||
|
||||
public function userPenilaiTeam()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id', 'id');
|
||||
}
|
||||
|
||||
public function team(){
|
||||
|
||||
return $this->belongsTo(Team::class, 'team_id', 'id');
|
||||
}
|
||||
|
||||
public function penilaian(){
|
||||
|
||||
return $this->hasMany(Penilaian::class, 'penilaian_id', 'id');
|
||||
}
|
||||
|
||||
protected static function newFactory(): PenilaianTeamFactory
|
||||
{
|
||||
//return PenilaianTeamFactory::new();
|
||||
}
|
||||
}
|
||||
@@ -84,4 +84,13 @@ class Permohonan extends Base
|
||||
{
|
||||
return $this->hasMany(PenawaranTender::class, 'nomor_registrasi');
|
||||
}
|
||||
|
||||
public function region()
|
||||
{
|
||||
return $this->belongsTo(Regions::class, 'region_id');
|
||||
}
|
||||
|
||||
public function penawaran(){
|
||||
return $this->belongsTo(PenawaranTender::class, 'nomor_registrasi', 'nomor_registrasi');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class SpekBangunan extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [];
|
||||
protected $fillable = ['code','name','status','spek_kategori_bangunan_id','authorized_status'];
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class SpekKategoritBangunan extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = [];
|
||||
protected $fillable = ['code','name','status','authorized_status'];
|
||||
|
||||
|
||||
public function bangunan()
|
||||
|
||||
@@ -30,8 +30,8 @@ class Teams extends Model
|
||||
return $this->hasMany(TeamsUsers::class, 'teams_id', 'id');
|
||||
}
|
||||
|
||||
public function penilaian(){
|
||||
return $this->hasMany(Penilaian::class, 'teams_id', 'id');
|
||||
public function penilaianTeam(){
|
||||
return $this->hasMany(PenilaianTeam::class, 'team_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ class TingkatKeramaian extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tingkat_keramaian';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
|
||||
23
app/Models/ViewUnit.php
Normal file
23
app/Models/ViewUnit.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Lpj\Database\Factories\ViewUnitFactory;
|
||||
|
||||
class ViewUnit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'view_unit';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $fillable = ['name', 'status', 'authorized_status', 'authorized_at', 'authorized_by', 'code'];
|
||||
|
||||
protected static function newFactory(): ViewUnitFactory
|
||||
{
|
||||
//return ViewUnitFactory::new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user