Added templivereading model file
This commit is contained in:
31
app/Models/TempLiveReading.php
Normal file
31
app/Models/TempLiveReading.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
|
class TempLiveReading extends Model
|
||||||
|
{
|
||||||
|
use SoftDeletes;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'plant_id',
|
||||||
|
'mfm_meter_id',
|
||||||
|
'register_data',
|
||||||
|
'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');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user