fix(db): 補全 metadata model import 與 realtime sales ORM

ADR-017 Phase 3f-0
This commit is contained in:
OoO
2026-04-29 21:00:46 +08:00
parent 8be332728e
commit f4149d4c05
12 changed files with 314 additions and 27 deletions

View File

@@ -1,14 +1,3 @@
# database/ai_models.py
# ⚠️ 這四個 class 的原始定義已移至 autoheal_models.pyADR-013 統一管理)。
# 此檔僅作向後相容 re-export shim不再重複定義 SQLAlchemy Table
# 以避免 "Table already defined for this MetaData instance" 衝突。
from .autoheal_models import ( # noqa: F401
AgentContext,
ActionPlan,
ActionOutcome,
AgentStrategyWeights,
)
# AI history and template models
from sqlalchemy import Column, Integer, String, DateTime, Text, Boolean, Float
from database.models import Base
@@ -163,6 +152,5 @@ class AIInsight(Base):
__all__ = [
"AgentContext", "ActionPlan", "ActionOutcome", "AgentStrategyWeights",
"AIGenerationHistory", "AIPromptTemplate", "AIUsageTracking", "AIInsight",
]