53 lines
1.1 KiB
PHP
53 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Paymenter\Extensions\Servers\Proxmox\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ServerStatistics extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $table = 'ext_proxmox_servers_statistics';
|
|
|
|
protected $fillable = [
|
|
'server_id',
|
|
'netin',
|
|
'netout',
|
|
'diskread',
|
|
'diskwrite',
|
|
'diskused',
|
|
'diskmax',
|
|
'memoryused',
|
|
'memorymax',
|
|
'cpuused',
|
|
'cpumax',
|
|
'uptime',
|
|
'vmstatus',
|
|
'DateTime',
|
|
'is_automatic',
|
|
];
|
|
|
|
protected $casts = [
|
|
'DateTime' => 'datetime',
|
|
'netin' => 'integer',
|
|
'netout' => 'integer',
|
|
'diskread' => 'integer',
|
|
'diskwrite' => 'integer',
|
|
'diskused' => 'integer',
|
|
'diskmax' => 'integer',
|
|
'memoryused' => 'integer',
|
|
'memorymax' => 'integer',
|
|
'cpuused' => 'decimal:4',
|
|
'cpumax' => 'decimal:4',
|
|
'uptime' => 'integer',
|
|
'is_automatic' => 'boolean',
|
|
];
|
|
|
|
public function server()
|
|
{
|
|
return $this->belongsTo(Server::class);
|
|
}
|
|
}
|
|
|