diff --git a/docs/superpowers/specs/2026-07-29-bilingual-enterprise-news-design.md b/docs/superpowers/specs/2026-07-29-bilingual-enterprise-news-design.md index 851e2a5..edce5b3 100644 --- a/docs/superpowers/specs/2026-07-29-bilingual-enterprise-news-design.md +++ b/docs/superpowers/specs/2026-07-29-bilingual-enterprise-news-design.md @@ -10,9 +10,12 @@ - 中文:`title_zh`、`article_type_zh`、`summary_zh`、`content_zh` - 英文:`title_en`、`article_type_en`、`summary_en`、`content_en` -- 共用:`cover_img`、`status`、`publish_time`、`read_count` +- 中文扩展:`cover_img_zh`、`publish_time_zh` +- 英文扩展:`cover_img_en`、`publish_time_en` +- 共用:`status`、`read_count` 新增文章仅要求 `title_zh` 必填,其余中英文字段允许为空。 +文章发布时,如果未传中英文发布时间,两个字段都默认当天日期。 ## 接口调整 @@ -22,16 +25,20 @@ - `news_article_detail.dspy`:返回全部中英文字段。 - `front_news_search.dspy`:支持中英文标题和类型筛选,返回全部中英文字段。 - `front_news_detail.dspy`:返回全部中英文字段,并保持阅读量加一。 +- `news_article_publish.dspy`:支持分别设置中英文发布时间,未传时均默认当天。 -发布、下架、删除接口不涉及语言字段,不调整。 +下架、删除接口不涉及语言字段,不调整。 ## 兼容边界 旧字段已由数据库移除非空约束,本次接口不再维护旧字段。调用方需要改为传入和读取中英文新字段。 +旧字段 `cover_img`、`publish_time` 同样不再读写。列表按两个发布时间中的较晚日期倒序排列,再按更新时间倒序排列。 ## 验证 - 新增时缺少 `title_zh` 返回校验错误。 - 新增、更新后详情能完整返回中英文字段。 - 后台和前端列表能按中英文标题、类型筛选。 +- 新增、编辑、列表和详情能分别读写中英文封面及发布时间。 +- 发布时未传中英文发布时间,两个字段均写入当天日期。 - 前端详情仍仅允许读取已发布文章,并正确增加阅读量。