выделение удалений, и заготовки

This commit is contained in:
2026-08-20 13:33:42 +03:00
parent 3cea13c103
commit 381e630c77
7 changed files with 1511 additions and 49 deletions

View File

@@ -981,6 +981,39 @@ class VmixAssignment(Base):
)
class VmixPreparedTitle(Base):
"""A match-scoped vMix title clone prepared by an operator.
The actual graphic lives in vMix. This row only remembers which source was
cloned, where the clone ended up and the field snapshot that was applied.
"""
__tablename__ = "hockey_vmix_prepared_titles"
id: Mapped[int] = mapped_column(Integer, primary_key=True)
wfl_user_id: Mapped[str] = mapped_column(String(128), nullable=False, index=True)
game_external_id: Mapped[str] = mapped_column(String(64), nullable=False, default="", index=True)
device_uuid: Mapped[str] = mapped_column(String(128), nullable=False, default="", index=True)
name: Mapped[str] = mapped_column(String(200), nullable=False, default="")
source_kind: Mapped[str] = mapped_column(String(32), nullable=False, default="manual")
source_ref: Mapped[str] = mapped_column(String(128), nullable=False, default="")
source_input_key: Mapped[str] = mapped_column(String(128), nullable=False, default="")
source_input_number: Mapped[str] = mapped_column(String(32), nullable=False, default="")
source_input_title: Mapped[str] = mapped_column(String(300), nullable=False, default="")
clone_input_key: Mapped[str] = mapped_column(String(128), nullable=False, default="")
clone_input_number: Mapped[str] = mapped_column(String(32), nullable=False, default="")
clone_input_title: Mapped[str] = mapped_column(String(300), nullable=False, default="")
field_values_json: Mapped[str] = mapped_column(Text, nullable=False, default="{}")
created_by: Mapped[str] = mapped_column(String(128), nullable=False, default="")
created_at: Mapped[datetime] = mapped_column(DateTime, nullable=False, default=datetime.utcnow)
updated_at: Mapped[datetime] = mapped_column(DateTime, nullable=False, default=datetime.utcnow)
__table_args__ = (
Index("ix_hockey_prepared_titles_user_game", "wfl_user_id", "game_external_id", "created_at"),
Index("ix_hockey_prepared_titles_device", "device_uuid", "created_at"),
)
class VmixMappingProfile(Base):
__tablename__ = "hockey_vmix_mapping_profiles"