Reorganized model structure by replacing 'object' and 'items' with a unified 'item' model using UUIDs, and moved base model logic into separate files. Updated routes to use the new item model and improved request/response handling. Enhanced user and setting models, added utility functions, and improved error handling throughout the codebase. Also added initial .idea project files and minor admin API improvements. Co-Authored-By: 砂糖橘 <54745033+Foxerine@users.noreply.github.com>
16 lines
314 B
Python
16 lines
314 B
Python
from datetime import datetime
|
|
|
|
from pydantic import BaseModel
|
|
|
|
class DefaultResponse(BaseModel):
|
|
code: int = 0
|
|
data: dict | list | bool | None
|
|
msg: str = ""
|
|
|
|
# FastAPI 鉴权返回模型
|
|
class TokenResponse(BaseModel):
|
|
access_token: str
|
|
|
|
class TokenData(BaseModel):
|
|
username: str | None = None
|