Menambahkan fitur kirim email tender part 1
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Modules\Location\Models\Province;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
// use Modules\Lpj\Database\Factories\KJPPFactory;
|
||||
|
||||
@@ -19,4 +20,9 @@ class KJPP extends Model
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $guarded = ['id'];
|
||||
|
||||
public function PenawaranDetailTender(): HasMany
|
||||
{
|
||||
return $this->hasMany(PenawaranDetailTender::class, 'kjpp_rekanan_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,4 +27,9 @@ class PenawaranDetailTender extends Model
|
||||
{
|
||||
return $this->belongsTo(KJPP::class, 'kjpp_rekanan_id', 'id');
|
||||
}
|
||||
|
||||
public function emailTenderLog(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PenawaranEmailTenderLog::class, 'penawaran_id', 'id', PenawaranTender::class);
|
||||
}
|
||||
}
|
||||
|
||||
18
app/Models/PenawaranEmailTenderLog.php
Normal file
18
app/Models/PenawaranEmailTenderLog.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
// use Modules\Lpj\Database\Factories\PenawaranEmailTenderLogFactory;
|
||||
|
||||
class PenawaranEmailTenderLog extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'penawaran_email_tender_log';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected $guarded = ['id'];
|
||||
}
|
||||
Reference in New Issue
Block a user