feat: 协作台账支持归档并精简状态列

This commit is contained in:
yml2213
2026-10-19 13:04:27 +08:00
parent 375567cbd2
commit 781b27e63a
11 changed files with 1040 additions and 66 deletions
+12
View File
@@ -1169,6 +1169,18 @@ class HuyaExternalOrder(Base):
done_at: Mapped[datetime | None] = mapped_column(UTCDateTime, nullable=True)
void_reason: Mapped[str] = mapped_column(String(256), default="", server_default="")
# ---- 归档(与业务状态正交:归档后仍是「抢购成功」,只是默认不出现在主台账)----
# NULL = 未归档;软隐藏不删数据,取消归档即可恢复。
archived_at: Mapped[datetime | None] = mapped_column(
UTCDateTime, nullable=True, index=True
)
archived_by: Mapped[int | None] = mapped_column(
ForeignKey("users.id"), nullable=True
)
archive_reason: Mapped[str] = mapped_column(
String(256), default="", server_default=""
)
# ---- 只读查询快照(不写 huya_accounts)----
points: Mapped[int | None] = mapped_column(Integer, nullable=True)
elite_opened: Mapped[bool | None] = mapped_column(Boolean, nullable=True)