perf: 同步近期修改
This commit is contained in:
@@ -117,15 +117,13 @@ class GetCaptchaResult(BaseModel):
|
||||
uuid: Optional[str] = Field(default=None, description="验证码UUID")
|
||||
captcha: Optional[str] = Field(default=None, description="验证码图片")
|
||||
captcha_enabled: Optional[bool] = Field(default=False, description="是否开启验证码")
|
||||
register_enabled: Optional[bool] = Field(default=False, description="是否开启注册")
|
||||
|
||||
class Config:
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"uuid": "1234567890",
|
||||
"captcha": "base64编码的图片",
|
||||
"captcha_enabled": True,
|
||||
"register_enabled": True
|
||||
"captcha_enabled": True
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,3 +348,42 @@ class ResetPasswordParams(BaseModel):
|
||||
"password": "123456"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class GetUserStatisticsResult(BaseModel):
|
||||
"""
|
||||
用户统计信息模型。
|
||||
"""
|
||||
today_count: int = Field(default=0, description="今日查询次数")
|
||||
this_month_count: int = Field(default=0, description="本月查询次数")
|
||||
last_month_count: int = Field(default=0, description="上月查询次数")
|
||||
before_14day_count_success: List[dict] = Field(default=[], description="最近14天成功查询次数")
|
||||
before_14day_count_fail: List[dict] = Field(default=[], description="最近14天失败查询次数")
|
||||
|
||||
class Config:
|
||||
json_schema_extra = {
|
||||
"example": {
|
||||
"today_count": 0,
|
||||
"this_month_count": 0,
|
||||
"last_month_count": 0,
|
||||
"before_14day_count_success": [
|
||||
{
|
||||
"date": "2023-10-01",
|
||||
"count": 0
|
||||
}
|
||||
],
|
||||
"before_14day_count_fail": [
|
||||
{
|
||||
"date": "2023-10-01",
|
||||
"count": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class GetUserStatisticsResponse(BaseResponse):
|
||||
"""
|
||||
获取用户统计信息响应模型。
|
||||
"""
|
||||
data: GetUserStatisticsResult = Field(default=None, description="响应数据")
|
||||
|
||||
Reference in New Issue
Block a user