余额变动修改
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use think\model\relation\HasMany;
|
||||
use Throwable;
|
||||
use think\model;
|
||||
use think\Exception;
|
||||
@@ -77,4 +78,14 @@ class UserMoneyLog extends model
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
|
||||
public function admin(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Admin::class, 'created_by');
|
||||
}
|
||||
|
||||
public function scoreLog(): hasMany
|
||||
{
|
||||
return $this->hasMany(UserScoreLog::class, 'money_log_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user