博弈分析按合约分类展示,新增合约下拉选择器
This commit is contained in:
@@ -53,18 +53,18 @@ class DailyBar(Base):
|
||||
|
||||
class PositionSnapshot(Base):
|
||||
__tablename__ = "position_snapshots"
|
||||
__table_args__ = (UniqueConstraint("institution", "direction", "date"),)
|
||||
__table_args__ = (UniqueConstraint("contract_code", "institution", "direction", "date"),)
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
contract_code: Mapped[str] = mapped_column(String(10), index=True, default="FG")
|
||||
institution: Mapped[str] = mapped_column(String(20), index=True)
|
||||
direction: Mapped[str] = mapped_column(String(10)) # "long" or "short"
|
||||
direction: Mapped[str] = mapped_column(String(10))
|
||||
date: Mapped[date] = mapped_column(Date, index=True)
|
||||
position: Mapped[int] = mapped_column(Integer)
|
||||
delta: Mapped[int] = mapped_column(Integer, default=0)
|
||||
avg_cost: Mapped[float] = mapped_column(Float)
|
||||
|
||||
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user