- Models: Inspeksi tambah 'mig_detail_data_jaminan' pada 'fillable'. - Models: PersetujuanPenawaran ubah import User, hapus 3 field lama. - Models: PersetujuanPenawaran tambah relasi 'region' (belongsTo Region). - Services: PreviewLaporanService tambah 22 item kategori preview. - Services: SaveFormInspesksiService refaktor parsing action & rules. - Services: TypeLaporanService tambah helper alamat & lokasi wilayah. - Services: TypeLaporanService tambahkan updateOrCreate untuk Penilai. - Services: TypeLaporanService tambah getInspeksi dan stub updatePenilai. - Cleanup: penataan kode, trimming, kurangi nested kondisi; mohon cek namespace.
67 lines
1.8 KiB
PHP
67 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Modules\Lpj\Models;
|
|
|
|
use Modules\Usermanagemenet\Models\User;
|
|
|
|
class PersetujuanPenawaran extends Base
|
|
{
|
|
|
|
protected $table = 'persetujuan_penawaran';
|
|
|
|
protected $fillable = [
|
|
'permohonan_id',
|
|
'penawaran_id',
|
|
'nomor_proposal_penawaran',
|
|
'tanggal_proposal_penawaran',
|
|
'biaya_final',
|
|
'sla_resume',
|
|
'sla_final',
|
|
'file_persetujuan_penawaran',
|
|
'surat_representasi',
|
|
'bukti_bayar',
|
|
'nominal_bayar',
|
|
'status',
|
|
'authorized_status',
|
|
'authorized_at',
|
|
'authorized_by',
|
|
'catatan',
|
|
];
|
|
|
|
protected $casts = [
|
|
'tanggal_proposal_penawaran' => 'date',
|
|
'biaya_final' => 'decimal:2',
|
|
'status' => 'boolean',
|
|
'authorized_status' => 'boolean',
|
|
'authorized_at' => 'datetime',
|
|
];
|
|
|
|
// Relationship with Penawaran
|
|
public function penawaran()
|
|
{
|
|
return $this->belongsTo(PenawaranTender::class, 'penawaran_id');
|
|
}
|
|
|
|
public function permohonan(){
|
|
return $this->belongsTo(Permohonan::class, 'permohonan_id');
|
|
}
|
|
|
|
// Relationship with Region
|
|
public function region()
|
|
{
|
|
return $this->belongsTo(Region::class);
|
|
}
|
|
|
|
// Relationship with User (for authorized_by)
|
|
public function authorizedBy()
|
|
{
|
|
return $this->belongsTo(User::class, 'authorized_by');
|
|
}
|
|
|
|
// Relationship with Noc
|
|
public function noc()
|
|
{
|
|
return $this->hasOne(Noc::class, 'persetujuan_penawaran_id');
|
|
}
|
|
}
|