integralConfig.js 428 B

123456789101112131415
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const SchemaDefine = {
  4. // 服务名
  5. service: { type: String, required: true },
  6. // 模块名
  7. module: { type: String, required: true },
  8. // 方法名
  9. method: { type: String, required: true },
  10. };
  11. const schema = new Schema(SchemaDefine);
  12. module.exports = app => {
  13. const { mongoose } = app;
  14. return mongoose.model('integralConfig', schema, 'integralConfig');
  15. };