mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-22 02:07:23 +08:00
30 lines
693 B
PHP
30 lines
693 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
class ServerMachineLoadHistory extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'v2_server_machine_load_history';
|
||
|
|
|
||
|
|
protected $guarded = ['id'];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'cpu' => 'float',
|
||
|
|
'mem_total' => 'integer',
|
||
|
|
'mem_used' => 'integer',
|
||
|
|
'disk_total' => 'integer',
|
||
|
|
'disk_used' => 'integer',
|
||
|
|
'recorded_at' => 'integer',
|
||
|
|
'created_at' => 'timestamp',
|
||
|
|
'updated_at' => 'timestamp',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function machine(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(ServerMachine::class, 'machine_id');
|
||
|
|
}
|
||
|
|
}
|