V1.2.0 alpha 1

- 支持使用 api 提交物品信息
- 支持 JWT 鉴权
This commit is contained in:
2025-03-28 04:53:37 +08:00
parent 3ff07b89de
commit 7d0d59677d
18 changed files with 695 additions and 247 deletions

13
model/token.py Normal file
View File

@@ -0,0 +1,13 @@
from pydantic import BaseModel
from passlib.context import CryptContext
# FastAPI 鉴权模型
# FastAPI authentication model
class Token(BaseModel):
access_token: str
token_type: str
class TokenData(BaseModel):
username: str | None = None
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")