1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 'use strict';
- module.exports = app => {
- const { mongoose } = app;
- const { Schema } = mongoose;
- const PageSchema = new Schema({
- // 标题
- title: {
- type: String,
- },
- // 短标题
- shortTitle: {
- type: String,
- },
- // 摘要
- slug: {
- type: String,
- },
- // 缩略图
- thumbnail: {
- tyoe: String,
- },
- // 附件
- annex: {
- type: String,
- },
- // 内容
- content: {
- type: Array,
- },
- // 创建时间
- createAt: {
- type: String,
- },
- // 数据id
- id: {
- type: String,
- },
- // 绑定菜单
- menu: {
- type: String,
- },
- });
- return mongoose.model('Page', PageSchema);
- };
|