feat: Phase 1 后端骨架主体入库(补 backend/app 主体与 requirements.txt)
上轮 3 次 commit 只入库了修补文件,主体目录漏入库。本次补入 backend/app/、backend/requirements.txt、backend/scripts/__init__.py。同步在 .gitignore 加 homePC/(制片人家用机带过来的参考文件,不进库)。
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
认证相关 Pydantic Schema — 请求 / 响应模型
|
||||
"""
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.models.user import UserRole
|
||||
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
|
||||
|
||||
class UserResponse(BaseModel):
|
||||
"""返回给前端的用户信息(不含 password_hash)。"""
|
||||
id: int
|
||||
username: str
|
||||
display_name: str
|
||||
role: UserRole
|
||||
profile_text: str | None = None
|
||||
is_active: bool = True
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
Reference in New Issue
Block a user