feat: 实现后端核心业务逻辑 (Auth鉴权、二维码服务、看板与产品端点)
This commit is contained in:
24
backend/app/schemas/user.py
Normal file
24
backend/app/schemas/user.py
Normal file
@ -0,0 +1,24 @@
|
||||
"""用户 Schemas — 对接 MOM sys_user 表"""
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
username: str = Field(..., max_length=64)
|
||||
password: str = Field(..., max_length=128)
|
||||
|
||||
|
||||
class UserResponse(BaseModel):
|
||||
id: str
|
||||
username: str
|
||||
display_name: str
|
||||
role: str
|
||||
is_active: bool = True
|
||||
created_at: str | None = None
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class LoginResponse(BaseModel):
|
||||
access_token: str
|
||||
token_type: str = "bearer"
|
||||
user: UserResponse
|
||||
Reference in New Issue
Block a user