'use strict'; const Schema = require('mongoose').Schema; const SchemaDefine = { // 机构编码 source: { type: String, required: true }, // 用户openID target: { type: String, required: true }, }; const schema = new Schema(SchemaDefine); module.exports = app => { const { mongoose } = app; return mongoose.model('orgbind', schema, 'orgbind'); };