mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-04 19:49:16 +00:00
25 lines
655 B
PHP
25 lines
655 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');
|
|
}
|
|
}
|