mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 11:09:27 +00:00
28 lines
539 B
PHP
28 lines
539 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* 用户流量记录.
|
|
*/
|
|
class UserDataFlowLog extends Model
|
|
{
|
|
public $timestamps = false;
|
|
protected $table = 'user_traffic_log';
|
|
|
|
// 关联账号
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'id');
|
|
}
|
|
|
|
// 关联节点
|
|
public function node(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Node::class, 'node_id', 'id');
|
|
}
|
|
}
|