'use strict'; module.exports = app => { const { mongoose } = app; const { Schema } = mongoose; const ContentSchema = new Schema({ // 标题 title: { type: String, }, // 短标题 shortTitle: { type: String, }, // 摘要 slug: { type: String, }, // 缩略图 thumbnail: { tyoe: String, }, // 附件 annex: { type: String, }, // 内容 content: { type: Array, }, // 创建时间 createAt: { type: String, }, // 置顶 istop: { type: Number, }, // 数据id id: { type: String, }, // 绑定栏目组 columnList: { type: Array, }, }); return mongoose.model('Content', ContentSchema); };