重构DiceLotteryConfig为DiceLotteryPoolConfig

This commit is contained in:
2026-03-10 17:56:14 +08:00
parent 1a748745cb
commit 54aa0bd34f
22 changed files with 160 additions and 160 deletions

View File

@@ -6,7 +6,7 @@
// +----------------------------------------------------------------------
namespace app\dice\model\play_record;
use app\dice\model\lottery_config\DiceLotteryConfig;
use app\dice\model\lottery_pool_config\DiceLotteryPoolConfig;
use app\dice\model\player\DicePlayer;
use app\dice\model\reward_config\DiceRewardConfig;
use plugin\saiadmin\basic\think\BaseModel;
@@ -71,12 +71,12 @@ class DicePlayRecord extends BaseModel
}
/**
* 彩金配置
* 关联模型 diceLotteryConfig
* 彩金配置
* 关联模型 diceLotteryPoolConfig
*/
public function diceLotteryConfig(): BelongsTo
public function diceLotteryPoolConfig(): BelongsTo
{
return $this->belongsTo(DiceLotteryConfig::class, 'lottery_config_id', 'id');
return $this->belongsTo(DiceLotteryPoolConfig::class, 'lottery_config_id', 'id');
}
/** 按玩家用户名模糊dicePlayer.username */
@@ -93,13 +93,13 @@ class DicePlayRecord extends BaseModel
}
}
/** 按彩金池配置名称模糊diceLotteryConfig.name */
/** 按彩金池配置名称模糊diceLotteryPoolConfig.name */
public function searchLotteryConfigNameAttr($query, $value)
{
if ($value === '' || $value === null) {
return;
}
$ids = DiceLotteryConfig::where('name', 'like', '%' . $value . '%')->column('id');
$ids = DiceLotteryPoolConfig::where('name', 'like', '%' . $value . '%')->column('id');
if (!empty($ids)) {
$query->whereIn('lottery_config_id', $ids);
} else {