2020-09-11 22:51:45 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
2020-09-13 18:39:38 +01:00
|
|
|
class Reading extends Model
|
2020-09-11 22:51:45 +01:00
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
2020-09-13 18:39:38 +01:00
|
|
|
'type',
|
|
|
|
'value',
|
2020-09-11 22:51:45 +01:00
|
|
|
];
|
2020-09-13 18:39:38 +01:00
|
|
|
|
|
|
|
public function sensor()
|
|
|
|
{
|
|
|
|
return $this->belongsTo('App\Models\Sensor');
|
|
|
|
}
|
2020-09-11 22:51:45 +01:00
|
|
|
}
|