feat(weibo): 增加微博微豆基础自动化
This commit is contained in:
@@ -912,6 +912,44 @@ class HuyaAccount(Base):
|
||||
tasks: Mapped[list[HuyaTask]] = relationship("HuyaTask", back_populates="account")
|
||||
|
||||
|
||||
class WeiboAccount(Base):
|
||||
"""微博微豆账号。
|
||||
|
||||
第一版只保存 CK 与微豆首页快照,不承载登录密码、支付或兑换数据。
|
||||
"""
|
||||
|
||||
__tablename__ = "weibo_accounts"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
uid: Mapped[str] = mapped_column(
|
||||
String(32), unique=True, nullable=False, index=True
|
||||
)
|
||||
nickname: Mapped[str] = mapped_column(String(128), default="")
|
||||
cookie: Mapped[str] = mapped_column(EncryptedText(), nullable=False)
|
||||
cookie_updated_at: Mapped[datetime | None] = mapped_column(
|
||||
UTCDateTime, nullable=True
|
||||
)
|
||||
tag: Mapped[str] = mapped_column(String(64), default="")
|
||||
activity: Mapped[str] = mapped_column(String(64), default="")
|
||||
|
||||
ck_check_status: Mapped[str] = mapped_column(
|
||||
String(16), nullable=False, default="", server_default=""
|
||||
)
|
||||
ck_check_message: Mapped[str] = mapped_column(Text, default="")
|
||||
ck_checked_at: Mapped[datetime | None] = mapped_column(UTCDateTime, nullable=True)
|
||||
|
||||
is_bound: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
game_role_name: Mapped[str] = mapped_column(String(128), default="")
|
||||
can_rebind: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
rebind_remain_days: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
weidou_balance: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
|
||||
created_at: Mapped[datetime] = mapped_column(UTCDateTime, default=_utcnow)
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
UTCDateTime, default=_utcnow, onupdate=_utcnow
|
||||
)
|
||||
|
||||
|
||||
class HuyaRegisterBatch(Base):
|
||||
"""虎牙自动注册批次(持久化元数据)"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user