power.js 464 B

1234567891011121314151617
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const SchemaDefine = {
  4. // 标识
  5. vipTab: { type: String, required: false },
  6. // openid
  7. openid: { type: String, required: true },
  8. // 文章IDlist
  9. list: { type: Array, required: true },
  10. // 绑定类型
  11. type: { type: String, required: true },
  12. };
  13. const schema = new Schema(SchemaDefine);
  14. module.exports = app => {
  15. const { mongoose } = app;
  16. return mongoose.model('power', schema, 'power');
  17. };