mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 11:09:27 +00:00
21 lines
391 B
PHP
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');
|
|
}
|
|
}
|