26 lines
594 B
PHP
26 lines
594 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class ActivityCrf extends SigdModel
|
|
{
|
|
protected $table = 'crf';
|
|
protected $fillable = [
|
|
'id', 'inventory_year', 'activity_year',
|
|
'sector', 'ws_code', //'parent_ws_code',
|
|
'gwp_co2', 'gwp_ch4', 'gwp_n2o',
|
|
'co2', 'ch4', 'n2o', 'co2eq',
|
|
'row_status', 'created_by', 'updated_by',
|
|
];
|
|
|
|
public function ws()
|
|
{
|
|
return $this->belongsTo(ReferenceWs::class, 'ws_code', 'ws_code');
|
|
}
|
|
|
|
public function sektor()
|
|
{
|
|
return $this->belongsTo(ReferenceSector::class, 'sector', 'code');
|
|
}
|
|
}
|