[色子游戏]玩家钱包流水记录-优化关联方式

This commit is contained in:
2026-03-03 14:11:52 +08:00
parent d214ccc2ba
commit fc5f8bb1ca

View File

@@ -43,9 +43,9 @@ class DicePlayerWalletRecord extends BaseModel
/**
* 关联模型 dicePlayer
*/
public function dicePlayer(): \think\model\relation\HasOne
public function dicePlayer(): \think\model\relation\BelongsTo
{
return $this->hasOne(DicePlayer::class, 'id', 'player_id');
return $this->belongsTo(DicePlayer::class, 'player_id', 'id');
}
}