1234567891011121314151617 |
- // 'use strict';
- // const Schema = require('mongoose').Schema;
- // const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
- // const Menu = {
- // title: { type: String, required: true, maxLength: 200 }, // 名称
- // router: { type: String, required: true, maxLength: 200 }, // 路由
- // status: { type: String, required: true, maxLength: 200, default: '0' }, // 状态:0=>使用中;1=>已禁用
- // };
- // const schema = new Schema(Menu, { toJSON: { virtuals: true } });
- // schema.index({ id: 1 });
- // schema.plugin(metaPlugin);
- // module.exports = app => {
- // const { mongoose } = app;
- // return mongoose.model('Menu', schema, 'menu');
- // };
|