feat: 添加新的错误码以支持配置版本管理,更新彩票配置以启用手动审核,增强 API 路由以支持玩法和赔率版本化管理

This commit is contained in:
2026-05-11 10:08:48 +08:00
parent aeaf124096
commit 067c2b39f5
41 changed files with 2578 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Lottery;
/**
* 玩法配置 / 赔率 / 风控封顶 共用版本状态play_config_versions 等表 {@see status})。
*/
enum ConfigVersionStatus: string
{
/** 草稿:可整表替换 items */
case Draft = 'draft';
/** 当前对玩家与下注逻辑生效的版本(每类最多一条) */
case Active = 'active';
/** 已被新版本替代,仅作历史查询 */
case Archived = 'archived';
}

View File

@@ -60,6 +60,15 @@ enum ErrorCode: int
/** PRD下注语境余额不足可与 1001 同语义) */
case BetInsufficientBalance = 2003;
/** 配置版本不是草稿,无法整表替换 items 或发布 */
case ConfigVersionNotDraft = 2101;
/** items 中存在未知 play_code未在 play_types 登记) */
case ConfigUnknownPlayCode = 2102;
/** 赔率 / 目录币种未启用或不可下注 */
case ConfigCurrencyInvalid = 2103;
/* ========== 80008999 玩家 SSO / Bearer 鉴权 ========== */
/** 无 Bearer / 格式错误 / token 为空 */