feat(douyu): 增加协作单礼包字典与权限控制
This commit is contained in:
@@ -567,6 +567,35 @@ class DouyuCollabShop(Base):
|
||||
)
|
||||
|
||||
|
||||
class DouyuCollabGift(Base):
|
||||
"""斗鱼外部单协作的礼包字典(管理员维护名称与所需积分)。"""
|
||||
|
||||
__tablename__ = "douyu_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 DouyuExternalOrder(Base):
|
||||
"""斗鱼外部单协作台账(一行 = 一单 = 一个内部斗鱼账号)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user