You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
434 B
PHTML
22 lines
434 B
PHTML
|
9 years ago
|
<?php
|
||
|
|
namespace App\Models;
|
||
|
|
|
||
|
|
class NodeInfoLog extends Model
|
||
|
|
{
|
||
|
|
protected $connection = "default";
|
||
|
|
protected $table = "ss_node_info";
|
||
|
|
|
||
|
|
public function getNodeLoad()
|
||
|
|
{
|
||
|
|
$load = $this->attributes['load'];
|
||
|
|
$exp = explode(" ", $load);
|
||
|
|
return $exp[0];
|
||
|
|
}
|
||
|
|
|
||
|
|
public function getTime()
|
||
|
|
{
|
||
|
|
$time = $this->attributes['log_time'];
|
||
|
|
return date('Y-m-d H:i:s', $time);
|
||
|
|
}
|
||
|
|
}
|