mirror of
https://github.com/vastsa/FileCodeBox.git
synced 2026-11-20 13:29:56 +08:00
Drop the message/msg envelope twin, all camel+snake dual-field response pairs (file list/detail/policy/storage, dashboard counters, batch op counts, status insights, presets, metadata), and camel request fields (clearExpiredAt, downloadLimit, sortBy/sortOrder, maxChars). Stored KeyValue JSON (metadata, presets, activities) keeps legacy-key read fallbacks so existing deployments normalize transparently.
12 lines
215 B
Python
12 lines
215 B
Python
from typing import Generic, Optional, TypeVar
|
|
|
|
from pydantic import BaseModel
|
|
|
|
T = TypeVar("T")
|
|
|
|
|
|
class APIResponse(BaseModel, Generic[T]):
|
|
code: int = 200
|
|
message: str = "ok"
|
|
detail: Optional[T] = None
|