[游戏管理]玩家钱包流水

This commit is contained in:
2026-04-15 11:50:14 +08:00
parent 9d06c7a226
commit ba80e7c392
5 changed files with 418 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
namespace app\common\model;
use support\think\Model;
/**
* 玩家游戏币钱包流水(只增不改;余额变更须与 game_user.coin 条件更新同事务)
*/
class GameUserWalletRecord extends Model
{
protected $name = 'game_user_wallet_record';
protected $autoWriteTimestamp = false;
protected $createTime = 'create_time';
protected $updateTime = false;
protected $type = [
'create_time' => 'integer',
'amount' => 'string',
'balance_before' => 'string',
'balance_after' => 'string',
];
public function gameUser(): \think\model\relation\BelongsTo
{
return $this->belongsTo(GameUser::class, 'user_id', 'id');
}
public function channel(): \think\model\relation\BelongsTo
{
return $this->belongsTo(Channel::class, 'channel_id', 'id');
}
public function operatorAdmin(): \think\model\relation\BelongsTo
{
return $this->belongsTo(\app\admin\model\Admin::class, 'operator_admin_id', 'id');
}
}