first commit
This commit is contained in:
28
app/Models/Machine.php
Normal file
28
app/Models/Machine.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Machine extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'location',
|
||||
'status',
|
||||
'temperature',
|
||||
'firmware_version',
|
||||
'last_heartbeat_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'last_heartbeat_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function logs()
|
||||
{
|
||||
return $this->hasMany(MachineLog::class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user