feat(huya): 增加协作单礼包字典与名称编辑
This commit is contained in:
@@ -1423,6 +1423,39 @@ class HuyaCollabShop(Base):
|
||||
)
|
||||
|
||||
|
||||
class HuyaCollabGiftCatalog(Base):
|
||||
"""虎牙外部单协作的礼包字典(管理员维护标准名称与所需积分)。
|
||||
|
||||
订单里仍存礼包名字符串;改名会级联历史订单,积分只作为之后新建/换礼包时的
|
||||
默认值,不回填历史订单的 ``required_points`` 快照。
|
||||
"""
|
||||
|
||||
__tablename__ = "huya_collab_gifts"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
name: Mapped[str] = mapped_column(
|
||||
String(128), unique=True, nullable=False, index=True
|
||||
)
|
||||
points: Mapped[int] = mapped_column(
|
||||
Integer, default=0, server_default="0", nullable=False
|
||||
)
|
||||
sort_order: Mapped[int] = mapped_column(Integer, default=0, server_default="0")
|
||||
is_active: Mapped[bool] = mapped_column(
|
||||
Boolean, default=True, server_default="1", index=True
|
||||
)
|
||||
remark: Mapped[str] = mapped_column(String(255), default="", server_default="")
|
||||
created_by: Mapped[int | None] = mapped_column(
|
||||
ForeignKey("users.id"), nullable=True
|
||||
)
|
||||
updated_by: Mapped[int | None] = mapped_column(
|
||||
ForeignKey("users.id"), nullable=True
|
||||
)
|
||||
created_at: Mapped[datetime] = mapped_column(UTCDateTime, default=_utcnow)
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
UTCDateTime, default=_utcnow, onupdate=_utcnow
|
||||
)
|
||||
|
||||
|
||||
class HuyaExternalOrder(Base):
|
||||
"""虎牙外部 CK 协作台账(替代 Excel 多人协同表)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user