mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-11 15:10:54 +00:00
1. 框架更新至5.8,并且其涉及代码进行修改; 2. 对支付的alipay组件针对php7.2/3进行修改; 3. 重构了节点信息获取逻辑;现在为实时请求; 4. 代码小细节和命名规范
42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Models;
|
|
|
|
use Eloquent;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* 用户订阅地址请求日志
|
|
* Class UserSubscribeLog
|
|
*
|
|
* @package App\Http\Models
|
|
* @mixin Eloquent
|
|
* @property int $id
|
|
* @property int|null $sid 对应user_subscribe的id
|
|
* @property string|null $request_ip 请求IP
|
|
* @property string|null $request_time 请求时间
|
|
* @property string|null $request_header 请求头部信息
|
|
* @property-read Collection|User[] $user
|
|
* @property-read int|null $user_count
|
|
* @method static Builder|UserSubscribeLog newModelQuery()
|
|
* @method static Builder|UserSubscribeLog newQuery()
|
|
* @method static Builder|UserSubscribeLog query()
|
|
* @method static Builder|UserSubscribeLog whereId($value)
|
|
* @method static Builder|UserSubscribeLog whereRequestHeader($value)
|
|
* @method static Builder|UserSubscribeLog whereRequestIp($value)
|
|
* @method static Builder|UserSubscribeLog whereRequestTime($value)
|
|
* @method static Builder|UserSubscribeLog whereSid($value)
|
|
*/
|
|
class UserSubscribeLog extends Model
|
|
{
|
|
public $timestamps = FALSE;
|
|
protected $table = 'user_subscribe_log';
|
|
protected $primaryKey = 'id';
|
|
|
|
function user()
|
|
{
|
|
return $this->hasManyThrough(User::class, UserSubscribe::class, 'id', 'id', 'sid', 'user_id');
|
|
}
|
|
} |