feat(weibo): 支持管理员强制更新占用账号 CK

This commit is contained in:
yml
2026-11-14 14:46:38 +08:00
parent b4801336c5
commit 17a2b5c464
7 changed files with 229 additions and 23 deletions
+13
View File
@@ -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):