feat: ChatBI自动报告生成—周报/月报/专项
This commit is contained in:
@@ -435,6 +435,21 @@ class BudgetDeviationAlert(Base):
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
|
||||
|
||||
class ReportHistory(Base):
|
||||
"""自动生成的经营分析报告记录"""
|
||||
__tablename__ = "report_history"
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
report_type = Column(String(20), nullable=False, comment="weekly/monthly/special")
|
||||
period = Column(String(20), nullable=False, comment="期间: 2026-W30 / 2026-07 / 2026-Q2")
|
||||
title = Column(String(200), nullable=False, comment="报告标题")
|
||||
markdown_content = Column(Text, nullable=True, comment="Markdown格式报告(用于微信推送)")
|
||||
json_content = Column(JSON, nullable=True, comment="JSON结构化数据(写入CMA系统)")
|
||||
status = Column(String(20), default="generated", comment="generated/pushed/failed")
|
||||
trigger_type = Column(String(20), default="manual", comment="manual/scheduled/event")
|
||||
alert_ref = Column(String(50), nullable=True, comment="事件触发时的预警引用")
|
||||
created_at = Column(DateTime, server_default=func.now())
|
||||
|
||||
|
||||
class AnalysisResult(Base):
|
||||
"""财务Bot分析结论 — 带置信度评分"""
|
||||
__tablename__ = "analysis_results"
|
||||
|
||||
Reference in New Issue
Block a user