交易流水对账明细 | AI引擎计价规则

This commit is contained in:
2026-07-10 16:57:23 +08:00
parent ad2e40bc67
commit 468184d352
50 changed files with 6998 additions and 506 deletions
@@ -73,6 +73,8 @@ class ChatGenerationTask(Base, TimestampMixin, SoftDeleteMixin):
engine_id: Mapped[str | None] = mapped_column(String(32), nullable=True, index=True)
engine_snapshot_json: Mapped[str | None] = mapped_column(Text, nullable=True)
provider_response_json: Mapped[str | None] = mapped_column(Text, nullable=True)
# 当前媒体扣费尝试号;Provider 回调必须按 owner + attempt_no 精确回填。
current_billing_attempt_no: Mapped[int | None] = mapped_column(Integer, nullable=True, index=True)
credits_cost: Mapped[float] = mapped_column(Float, default=0.0)
text_credits_cost: Mapped[float] = mapped_column(Float, default=0.0)