wxMenuModel.js 442 B

12345678910111213141516171819
  1. 'use strict';
  2. module.exports = app => {
  3. const mongoose = app.mongoose;
  4. const Schema = mongoose.Schema;
  5. const WXMenuSchema = new Schema({
  6. appid: { type: String },
  7. name: { type: String },
  8. url: { type: String },
  9. type: { type: String },
  10. sub_button: [{
  11. name: { type: String },
  12. url: { type: String },
  13. type: { type: String },
  14. }],
  15. });
  16. return mongoose.model('wxMenu', WXMenuSchema, 'wx_menu');
  17. };