feat: 增强玩家 API,新增 locale 和时间字段,更新钱包 API 以支持可用余额计算,添加错误码与多语言支持

This commit is contained in:
2026-05-09 15:05:46 +08:00
parent f1b38ef421
commit a0f86a4e36
36 changed files with 2523 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace App\Exceptions;
use App\Lottery\ErrorCode;
use App\Support\ApiResponse;
use RuntimeException;
/**
* 玩家钱包划转等业务失败时抛出,由控制器捕获并转为 {@see ApiResponse} JSON。
*
* @property-read int $lotteryCode {@see ErrorCode}
*/
final class WalletOperationException extends RuntimeException
{
public function __construct(
string $message,
public readonly int $lotteryCode,
public readonly int $httpStatus = 400,
) {
parent::__construct($message);
}
}