update notis peringatan untuk callcenter jana

This commit is contained in:
Nur Izzati Zulkifli
2023-04-17 09:24:52 +08:00
parent 33231cf6d6
commit c83f81f45d
26 changed files with 3935 additions and 459 deletions
+61
View File
@@ -0,0 +1,61 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Notis extends Model
{
use HasFactory;
protected $table = 'notis';
protected $fillable = [
'tarikh_notis',
'daritempoh',
'hinggatempoh',
'sts_notis',
'fasa'
];
public function cawangan()
{
return $this->belongsToMany(Cawangan::class, 'cawangan_notis', 'notis_id', 'caw_id')->withPivot('status');
}
public function cawanganNotis()
{
return $this->hasMany(cawanganNotis::class, 'notis_id');
}
public function notisBid()
{
return $this->hasMany(NotisBid::class, 'notis_id', 'id');
}
// public function lelongBidJual()
// {
// return $this->hasMany(LelongBid::class, 'lelong_id', 'id')->where('status_jual', 1);
// }
// public function lelongBidBelumSemak()
// {
// return $this->hasMany(LelongBid::class, 'lelong_id', 'id')->where('status_semak', 0);
// }
// public function lelKarat()
// {
// return $this->hasMany(LelKarat::class, 'lelong_id', 'id');
// }
// public function pengesahan()
// {
// return $this->hasMany(Pengesahan::class, 'lelong_id', 'id');
// }
// public function pengesahanTelahSah()
// {
// return $this->hasMany(Pengesahan::class, 'lelong_id', 'id')->whereNotNull('disahkan_oleh');
// }
}