feat(plan): 为月度计划添加软删除并优化状态提示词

为 `MonthlyPlan` 数据库模型增加 `is_deleted` 字段,以支持软删除功能,避免数据直接丢失。

同时,统一并优化了注入到AI上下文中的当前日程活动提示词,指导模型仅在被直接询问时才提及自身状态,使对话更加自然流畅。
This commit is contained in:
tt-P607
2025-10-23 21:48:29 +08:00
parent e5effe6a59
commit 50050dd985
3 changed files with 6 additions and 5 deletions

View File

@@ -654,6 +654,7 @@ class MonthlyPlan(Base):
usage_count: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
last_used_date: Mapped[str | None] = mapped_column(String(10), nullable=True, index=True)
created_at: Mapped[datetime.datetime] = mapped_column(DateTime, nullable=False, default=datetime.datetime.now)
is_deleted: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False, index=True)
__table_args__ = (
Index("idx_monthlyplan_target_month_status", "target_month", "status"),