mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 12:29:19 +08:00
feat: 重构 Agent 目录为 api/agent/infrastructure 分层并更新启动入口
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"""与 Java ApiResponse 对齐的统一响应。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
|
||||
def ok(data: Any = None, message: str = "操作成功") -> dict[str, Any]:
|
||||
return {"code": 0, "message": message, "data": data}
|
||||
|
||||
|
||||
def fail(message: str, code: int = 1) -> dict[str, Any]:
|
||||
return {"code": code, "message": message, "data": None}
|
||||
|
||||
Reference in New Issue
Block a user