Files
ProxyPanel/app/Models/NodeHeartbeat.php
2021-01-12 14:32:02 +08:00

21 lines
391 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 节点负载信息.
*/
class NodeHeartbeat extends Model
{
public $timestamps = false;
protected $table = 'node_heartbeat';
protected $guarded = [];
public function scopeRecently($query)
{
return $query->where('log_time', '>=', strtotime('-10 minutes'))->latest('log_time');
}
}