53 lines
1.0 KiB
PHP
53 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Cerobong extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'Cerobong';
|
|
|
|
protected $primaryKey = 'CerobongId';
|
|
|
|
// Atribut yang dapat diisi secara massal
|
|
protected $fillable = [
|
|
'PelaporanId',
|
|
'RefCerobongId',
|
|
'Kode',
|
|
'Nama',
|
|
'SumberEmisi',
|
|
'JenisBahanBakar',
|
|
'Konsumsi',
|
|
'Bentuk',
|
|
'Tinggi',
|
|
'Diameter',
|
|
'Posisi',
|
|
'JenisPengendali',
|
|
'JamOperasional',
|
|
'Kapasitas',
|
|
'SatuanKapasitas',
|
|
'Lintang',
|
|
'Bujur',
|
|
];
|
|
|
|
/**
|
|
* Relasi ke model Pelaporan.
|
|
*/
|
|
public function pelaporan()
|
|
{
|
|
return $this->belongsTo(Pelaporan::class, 'PelaporanId', 'PelaporanId');
|
|
}
|
|
|
|
/**
|
|
* Relasi ke model RefCerobong.
|
|
*/
|
|
public function refCerobong()
|
|
{
|
|
return $this->belongsTo(RefCerobong::class, 'RefCerobongId', 'RefCerobongId');
|
|
}
|
|
}
|