51 lines
987 B
PHP
51 lines
987 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class HasilUjiAL extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'HasilUjiAL';
|
|
|
|
protected $primaryKey = 'HasilUjiALId';
|
|
|
|
protected $fillable = [
|
|
'IpalId',
|
|
'Tahun',
|
|
'PerusahaanId',
|
|
'IpalParameterId',
|
|
'Bulan',
|
|
'Nilai',
|
|
'Debit',
|
|
'BebanEmisi',
|
|
];
|
|
|
|
/**
|
|
* Relasi ke model Ipal.
|
|
*/
|
|
public function ipal()
|
|
{
|
|
return $this->belongsTo(Ipal::class, 'IpalId', 'IpalId');
|
|
}
|
|
|
|
/**
|
|
* Relasi ke model Perusahaan.
|
|
*/
|
|
public function perusahaan()
|
|
{
|
|
return $this->belongsTo(Perusahaan::class, 'PerusahaanId', 'PerusahaanId');
|
|
}
|
|
|
|
/**
|
|
* Relasi ke model IpalParameter.
|
|
*/
|
|
public function ipalParameter()
|
|
{
|
|
return $this->belongsTo(IpalParameter::class, 'IpalParameterId', 'IpalParameterId');
|
|
}
|
|
}
|