40 lines
872 B
PHP
40 lines
872 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class NilaiKomponenPihakKetiga extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'NilaiKomponenPihakKetiga';
|
|
|
|
protected $primaryKey = 'NilaiKomponenPihakKetigaId';
|
|
protected $fillable = [
|
|
'NilaiKomponenId',
|
|
'Nama',
|
|
'IzinPihakKetigaId',
|
|
'Jumlah',
|
|
'Satuan',
|
|
'IsDeleted',
|
|
];
|
|
|
|
/**
|
|
* Relasi ke model NilaiKomponen.
|
|
*/
|
|
public function nilaiKomponen()
|
|
{
|
|
return $this->belongsTo(NilaiKomponen::class, 'NilaiKomponenId', 'NilaiKomponenId');
|
|
}
|
|
|
|
/**
|
|
* Relasi ke model IzinPihakKetiga.
|
|
*/
|
|
public function izinPihakKetiga()
|
|
{
|
|
return $this->belongsTo(IzinPihakKetiga::class, 'IzinPihakKetigaId', 'IzinPihakKetigaId');
|
|
}
|
|
}
|