feat: Implement API routers for user, tag, vas, webdav, and slave functionalities
- Added user authentication and registration endpoints with JWT support. - Created tag management routes for creating and deleting tags. - Implemented value-added service (VAS) endpoints for managing storage packs and orders. - Developed WebDAV account management routes for creating, updating, and deleting accounts. - Introduced slave router for handling file uploads, downloads, and aria2 task management. - Enhanced JWT utility functions for token creation and secret key management. - Established lifespan management for FastAPI application startup and shutdown processes. - Integrated password handling utilities with Argon2 hashing and two-factor authentication support.
This commit is contained in:
@@ -10,17 +10,8 @@ from sqlmodel import Field
|
||||
from .base import SQLModelBase
|
||||
|
||||
# [TODO] 未来把这拆了,直接按需返回状态码
|
||||
class ResponseModel(SQLModelBase):
|
||||
class ResponseBase(SQLModelBase):
|
||||
"""通用响应模型"""
|
||||
|
||||
code: int = Field(default=0, ge=0, lt=60000)
|
||||
"""系统内部状态码,0表示成功,其他表示失败"""
|
||||
|
||||
data: Any = None
|
||||
"""响应数据"""
|
||||
|
||||
msg: str | None = None
|
||||
"""响应消息,可以是错误消息或信息提示"""
|
||||
|
||||
instance_id: uuid.UUID = Field(default_factory=uuid.uuid4)
|
||||
"""实例ID,用于标识请求的唯一性"""
|
||||
|
||||
Reference in New Issue
Block a user