WIP-CHECKPOINT[auth-refactor]: 固化工程师崩溃前部分成果 + 同树其他未提交WIP(仅源码,不含密钥/二进制)-- 待重激活工程师续作

This commit is contained in:
Simon
2026-07-07 21:52:11 +08:00
parent 242c1967ff
commit fab75760e0
203 changed files with 21504 additions and 3345 deletions
+9 -1
View File
@@ -41,9 +41,17 @@ class AgentLogin(BaseModel):
user_id: str = Field(..., min_length=1, max_length=64, description="企微用户ID")
name: str = Field(..., min_length=1, max_length=128, description="坐席姓名")
otp_code: Optional[str] = Field(None, min_length=6, max_length=6, description="OTP动态码(6位数字)")
otp_code: Optional[str] = Field(None, description="OTP动态码(6位数字)")
password: Optional[str] = Field(None, description="本地密码(可选)")
@field_validator('otp_code')
@classmethod
def validate_otp_code(cls, v):
"""OTP验证码验证:有值时必须是6位数字"""
if v is not None and (len(v) != 6 or not v.isdigit()):
raise ValueError('OTP验证码必须是6位数字')
return v
# --------------------------------------------------------------------------
# 坐席状态更新 Schema