模型概览
所有内容(案例 / 实验室资源 / 知识文章 / 课程 / 思考)共用一个 Content MongoDB 集合,通过 type 字段区分。
字段定义
typescriptinterface ContentItem {type: "case" | "skill" | "knowledge" | "thinking" | "course";slug: string; // 同 type 下唯一title: string;status: "draft" | "published" | "archived";category?: string;date?: string;content: string; // Markdown// ... 各类型专属字段}
查询约束
- 前台只读取
status: 'published' - 后台可读写所有状态
- slug 只允许小写字母/数字/短横线
提交反馈
图文Content 数据模型 API 参考