feat(weibo): 增加微博微豆基础自动化
This commit is contained in:
@@ -462,6 +462,160 @@ class AccountCheckBatchOut(BaseModel):
|
||||
items: list[AccountCheckItemOut]
|
||||
|
||||
|
||||
# ---- 微博微豆 ----
|
||||
class WeiboCookieImport(BaseModel):
|
||||
"""批量导入微博 CK;每行一个完整 Cookie。"""
|
||||
|
||||
text: str = Field(..., min_length=1)
|
||||
tag: str = Field("", max_length=64)
|
||||
|
||||
|
||||
class WeiboImportError(BaseModel):
|
||||
line: int
|
||||
message: str
|
||||
|
||||
|
||||
class WeiboAccountOut(BaseModel):
|
||||
id: int
|
||||
uid: str
|
||||
nickname: str = ""
|
||||
tag: str = ""
|
||||
activity: str = ""
|
||||
ck_check_status: str = ""
|
||||
ck_check_message: str = ""
|
||||
ck_checked_at: datetime | None = None
|
||||
is_bound: bool | None = None
|
||||
game_role_name: str = ""
|
||||
can_rebind: bool | None = None
|
||||
rebind_remain_days: int | None = None
|
||||
weidou_balance: int | None = None
|
||||
cookie_updated_at: datetime | None = None
|
||||
created_at: datetime | None = None
|
||||
updated_at: datetime | None = None
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
|
||||
class WeiboImportResult(BaseModel):
|
||||
success: bool
|
||||
message: str
|
||||
count: int
|
||||
skipped: int
|
||||
errors: list[WeiboImportError] = Field(default_factory=list)
|
||||
accounts: list[WeiboAccountOut] = Field(default_factory=list)
|
||||
|
||||
|
||||
class WeiboBindSchemeOut(BaseModel):
|
||||
channel: str
|
||||
label: str
|
||||
scheme: str = ""
|
||||
error: str = ""
|
||||
|
||||
|
||||
class WeiboBindQrOut(BaseModel):
|
||||
account_id: int
|
||||
is_bound: bool
|
||||
can_rebind: bool
|
||||
rebind_remain_days: int
|
||||
schemes: list[WeiboBindSchemeOut]
|
||||
|
||||
|
||||
class WeiboGoodsOut(BaseModel):
|
||||
id: int
|
||||
goods_name: str = ""
|
||||
goods_image: str = ""
|
||||
price: int = 0
|
||||
remain_count: int | None = None
|
||||
is_sold_out: bool = False
|
||||
goods_desc: str = ""
|
||||
|
||||
|
||||
class WeiboMallListOut(BaseModel):
|
||||
account_id: int
|
||||
weidou_balance: int = 0
|
||||
goods: list[WeiboGoodsOut] = Field(default_factory=list)
|
||||
|
||||
|
||||
class WeiboExchangeRequest(BaseModel):
|
||||
goods_id: int = Field(..., gt=0)
|
||||
expected_price: int = Field(..., gt=0)
|
||||
confirm: bool = False
|
||||
|
||||
|
||||
class WeiboExchangeOut(BaseModel):
|
||||
account_id: int
|
||||
goods_id: int
|
||||
goods_name: str
|
||||
price: int
|
||||
balance_before: int
|
||||
balance_after: int | None = None
|
||||
remain_before: int | None = None
|
||||
remain_after: int | None = None
|
||||
verified: bool
|
||||
verify_error: str = ""
|
||||
|
||||
|
||||
class WeiboExchangeRecordItem(BaseModel):
|
||||
goods_name: str = ""
|
||||
game_account: str = ""
|
||||
cost_weidou: int | None = None
|
||||
exchange_time: str = ""
|
||||
reward_status: int | None = None
|
||||
raw: dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
|
||||
class WeiboExchangeRecordsOut(BaseModel):
|
||||
account_id: int
|
||||
page: int
|
||||
page_size: int
|
||||
total: int
|
||||
items: list[WeiboExchangeRecordItem] = Field(default_factory=list)
|
||||
|
||||
|
||||
class WeiboPointRecordItem(BaseModel):
|
||||
id: str = ""
|
||||
source_type: int | None = None
|
||||
record_type: int | None = None
|
||||
source_id: str = ""
|
||||
source_name: str = ""
|
||||
point_num: int = 0
|
||||
create_time: str = ""
|
||||
expire_time: str = ""
|
||||
|
||||
|
||||
class WeiboPointHistoryOut(BaseModel):
|
||||
account_id: int
|
||||
page: int
|
||||
page_size: int
|
||||
total: int
|
||||
items: list[WeiboPointRecordItem] = Field(default_factory=list)
|
||||
|
||||
|
||||
class WeiboRechargeRequest(BaseModel):
|
||||
amount_yuan: int = Field(1, ge=1, le=1000)
|
||||
|
||||
|
||||
class WeiboRechargeOrderOut(BaseModel):
|
||||
account_id: int
|
||||
order_id: str
|
||||
pay_id: str
|
||||
amount_yuan: int
|
||||
single_reward: int
|
||||
alipay_qr_code: str
|
||||
desktop_pay_url: str = ""
|
||||
|
||||
|
||||
class WeiboPaymentStatusRequest(BaseModel):
|
||||
pay_id: str = Field(..., min_length=1, max_length=128)
|
||||
|
||||
|
||||
class WeiboPaymentStatusOut(BaseModel):
|
||||
pay_id: str
|
||||
out_pay_id: str = ""
|
||||
status: str
|
||||
sub_status: str = ""
|
||||
|
||||
|
||||
# ---- 虎牙 ----
|
||||
class HuyaCookieImport(BaseModel):
|
||||
"""批量导入虎牙 Cookie。支持纯 CK 或 账号----密码----CK。"""
|
||||
|
||||
Reference in New Issue
Block a user