Commit Graph

2 Commits

Author SHA1 Message Date
ca195192b6 fix: 协同留言时间改为北京时间
根因: ProductMessage.created_at 使用 datetime.utcnow (UTC),
      与其他所有模型使用的 get_beijing_time 不一致。
      看板留言抽屉显示的时间比实际晚8小时。

修复:
  1. message.py: DateTime → DateTime(timezone=True)
     default 从 datetime.utcnow → get_beijing_time
  2. dashboard_service.py: 兜底转换已有数据
     naive UTC → replace(tzinfo=UTC) → astimezone(Beijing)
2026-08-12 13:55:33 +08:00
b14773f81b feat: 产品协同留言板 — ProductMessage 模型 + API + 迁移
- 新增 ProductMessage 模型,挂载在 products.id(ON DELETE CASCADE)
- GET/POST /products/{id}/messages 接口
- 注册到 Alembic 自动发现
2026-08-10 17:37:01 +08:00