'use strict'; const Schema = require('mongoose').Schema; const SchemaDefine = { // 服务名 service: { type: String, required: true }, // 模块名 module: { type: String, required: true }, // 方法名 method: { type: String, required: true }, }; const schema = new Schema(SchemaDefine); module.exports = app => { const { mongoose } = app; return mongoose.model('integralConfig', schema, 'integralConfig'); };