skl/app/Models/CerobongParameter.php

43 lines
905 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CerobongParameter extends Model
{
use HasFactory;
protected $table = 'CerobongParameter';
protected $primaryKey = 'CerobongParameterId';
protected $fillable = [
'CerobongId',
'RefCerobongParameterId',
'Nama',
'Satuan',
'BakuMutuJenis',
'BakuMutuNilai1',
'BakuMutuNilai2',
'Del',
];
/**
* Relasi ke model Cerobong.
*/
public function cerobong()
{
return $this->belongsTo(Cerobong::class, 'CerobongId', 'CerobongId');
}
/**
* Relasi ke model RefCerobongParameter.
*/
public function refCerobongParameter()
{
return $this->belongsTo(RefCerobongParameter::class, 'RefCerobongParameterId', 'RefCerobongParameterId');
}
}