Files
ProxyPanel/app/Http/Models/SsNodeIp.php
Bretton 7fa56ada16 2.1 版本
1. 框架更新至5.8,并且其涉及代码进行修改;
2.  对支付的alipay组件针对php7.2/3进行修改;
3. 重构了节点信息获取逻辑;现在为实时请求;
4. 代码小细节和命名规范
2020-08-05 03:20:24 +08:00

50 lines
1.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Http\Models;
use Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* SS节点在线IP信息
* Class SsNodeIp
*
* @package App\Http\Models
* @mixin Eloquent
* @property int $id
* @property int $node_id 节点ID
* @property int $user_id 用户ID
* @property int $port 端口
* @property string $type 类型all、tcp、udp
* @property string|null $ip 连接IP每个IP用,号隔开
* @property Carbon $created_at 上报时间
* @property-read SsNode $node
* @property-read User $user
* @method static Builder|SsNodeIp newModelQuery()
* @method static Builder|SsNodeIp newQuery()
* @method static Builder|SsNodeIp query()
* @method static Builder|SsNodeIp whereCreatedAt($value)
* @method static Builder|SsNodeIp whereId($value)
* @method static Builder|SsNodeIp whereIp($value)
* @method static Builder|SsNodeIp whereNodeId($value)
* @method static Builder|SsNodeIp wherePort($value)
* @method static Builder|SsNodeIp whereType($value)
* @method static Builder|SsNodeIp whereUserId($value)
*/
class SsNodeIp extends Model
{
protected $table = 'ss_node_ip';
protected $primaryKey = 'id';
function node()
{
return $this->belongsTo(SsNode::class, 'node_id', 'id');
}
function user()
{
return $this->belongsTo(User::class, 'port', 'port');
}
}