integral.js 424 B

123456789101112131415
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const SchemaDefine = {
  4. // 用户名(帐号)
  5. openid: { type: String, required: false },
  6. // 姓名
  7. name: { type: String, required: false },
  8. // 积分
  9. integral: { type: Number, required: false },
  10. };
  11. const schema = new Schema(SchemaDefine);
  12. module.exports = app => {
  13. const { mongoose } = app;
  14. return mongoose.model('integral', schema, 'integral');
  15. };