refactor:拆分 API 路由与请求校验,统一 final 类和代码风格
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use App\Lottery\ErrorCode;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* 对外 API 统一 JSON 结构:{ code, msg, data }。
|
||||
*
|
||||
* - `code=0` 即 {@see \App\Lottery\ErrorCode::Success};非 0 见 `ErrorCode` 与 docs/04 §10。
|
||||
* - `code=0` 即 {@see ErrorCode::Success};非 0 见 `ErrorCode` 与 docs/04 §10。
|
||||
* - error() 的 HTTP 状态可与 code 独立(如鉴权失败 401 + code 8001)。
|
||||
*/
|
||||
final class ApiResponse
|
||||
|
||||
Reference in New Issue
Block a user