mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 11:09:27 +00:00
28 lines
697 B
PHP
28 lines
697 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasOneThrough;
|
|
|
|
/**
|
|
* 用户订阅地址请求日志.
|
|
*/
|
|
class UserSubscribeLog extends Model
|
|
{
|
|
public const CREATED_AT = 'request_time';
|
|
public const UPDATED_AT = null;
|
|
protected $table = 'user_subscribe_log';
|
|
|
|
public function subscribe(): BelongsTo
|
|
{
|
|
return $this->belongsTo(UserSubscribe::class, 'user_subscribe_id');
|
|
}
|
|
|
|
public function user(): HasOneThrough
|
|
{
|
|
return $this->hasOneThrough(User::class, UserSubscribe::class, 'id', 'id', 'user_subscribe_id', 'user_id');
|
|
}
|
|
}
|