'use strict'; module.exports = app => { const { mongoose } = app; const { Schema } = mongoose; const MenuSchema = new Schema({ name: { type: String, }, code: { type: String, }, id: { type: String, }, state: { type: String, }, type: { type: String, }, uri: { type: String, }, pid: { type: String, }, en: { type: String, }, sort: { type: Number, }, pages: { type: String, }, // 绑定栏目 column: { type: Array, required: false }, }); return mongoose.model('Menu', MenuSchema); };