37 lines
710 B
PHP
37 lines
710 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class MfmParameter extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $fillable = [
|
|
'plant_id',
|
|
'mfm_meter_id',
|
|
'name',
|
|
'register_id',
|
|
'identifier',
|
|
'byte_to_convert',
|
|
'type_to_convert',
|
|
'decimal_to_display',
|
|
'created_at',
|
|
'updated_at',
|
|
'created_by',
|
|
];
|
|
|
|
public function plant(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Plant::class);
|
|
}
|
|
|
|
public function mfmMeter(): BelongsTo
|
|
{
|
|
return $this->belongsTo(MfmMeter::class, 'mfm_meter_id');
|
|
}
|
|
}
|