123456789101112131415 |
- 'use strict';
- const Schema = require('mongoose').Schema;
- const SchemaDefine = {
- // 用户名(帐号)
- openid: { type: String, required: false },
- // 姓名
- name: { type: String, required: false },
- // 积分
- integral: { type: Number, required: false },
- };
- const schema = new Schema(SchemaDefine);
- module.exports = app => {
- const { mongoose } = app;
- return mongoose.model('integral', schema, 'integral');
- };
|