feat(weibo): 支持管理员强制更新占用账号 CK
This commit is contained in:
@@ -474,11 +474,24 @@ class WeiboCookieImport(BaseModel):
|
||||
text: str = Field(..., min_length=1)
|
||||
tag: str = Field("", max_length=64)
|
||||
update_existing: bool = False
|
||||
force_update: bool = False
|
||||
|
||||
@model_validator(mode="after")
|
||||
def _validate_force_update(self):
|
||||
if self.force_update and not self.update_existing:
|
||||
raise ValueError("强制更新必须同时勾选“重复账号时更新 CK”")
|
||||
return self
|
||||
|
||||
|
||||
class WeiboImportError(BaseModel):
|
||||
line: int
|
||||
message: str
|
||||
account_id: int | None = None
|
||||
uid: str = ""
|
||||
assigned_user_id: int | None = None
|
||||
assigned_username: str = ""
|
||||
workbench_owner_id: int | None = None
|
||||
workbench_owner_username: str = ""
|
||||
|
||||
|
||||
class WeiboImportDuplicateOut(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user