Menghapus beberapa use statements yang tidak digunakan lagi di PersetujuanPenawaran.php. Menambahkan fields baru dan memperbarui tipe casting pada beberapa fields yang sudah ada. Mengoreksi relasi belongsTo pada PenawaranTender.php agar sesuai dengan parameter yang benar.
58 lines
1.6 KiB
PHP
58 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Modules\Lpj\Models;
|
|
|
|
use Modules\Usermanagemenet\Models\User;
|
|
|
|
class PersetujuanPenawaran extends Base
|
|
{
|
|
|
|
protected $table = 'persetujuan_penawaran';
|
|
|
|
protected $fillable = [
|
|
'penawaran_id',
|
|
'nomor_proposal_penawaran',
|
|
'tanggal_proposal_penawaran',
|
|
'biaya_final',
|
|
'sla_resume',
|
|
'sla_final',
|
|
'file_persetujuan_penawaran',
|
|
'surat_representasi',
|
|
'bukti_bayar',
|
|
'status',
|
|
'authorized_status',
|
|
'authorized_at',
|
|
'authorized_by',
|
|
'status',
|
|
'catatan',
|
|
];
|
|
|
|
protected $casts = [
|
|
'tanggal_proposal_penawaran' => 'date',
|
|
'sla_resume' => 'date',
|
|
'sla_final' => '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');
|
|
}
|
|
|
|
// 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');
|
|
}
|
|
}
|