初步增加, 扫码登录成功
This commit is contained in:
@@ -13,6 +13,25 @@ from .huya_defaults import (
|
||||
)
|
||||
|
||||
|
||||
class YybTaskCreateRequest(BaseModel):
|
||||
"""创建 YYB 任务;登录方式在下一步选择。"""
|
||||
|
||||
|
||||
class YybLoginRequest(BaseModel):
|
||||
provider: str = Field(..., pattern="^(qq|wechat)$")
|
||||
timeout: int = Field(600, ge=60, le=1800)
|
||||
|
||||
|
||||
class YybSelectionRequest(BaseModel):
|
||||
platform: str = Field(..., pattern="^(android|ios)$")
|
||||
points: int = Field(..., gt=0)
|
||||
product_id: str = Field(..., min_length=1, max_length=128)
|
||||
zone_id: str = Field(..., min_length=1, max_length=64)
|
||||
zone_name: str = Field("", max_length=128)
|
||||
role_id: str = Field(..., min_length=1, max_length=64)
|
||||
role_name: str = Field(..., min_length=1, max_length=128)
|
||||
|
||||
|
||||
def _ensure_tz(dt: Optional[datetime]) -> Optional[datetime]:
|
||||
"""确保 datetime 带有 UTC 时区信息,无时区的视为 UTC。"""
|
||||
if dt is None:
|
||||
|
||||
Reference in New Issue
Block a user