orgbind.js 360 B

12345678910111213
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const SchemaDefine = {
  4. // 机构编码
  5. source: { type: String, required: true },
  6. // 用户openID
  7. target: { type: String, required: true },
  8. };
  9. const schema = new Schema(SchemaDefine);
  10. module.exports = app => {
  11. const { mongoose } = app;
  12. return mongoose.model('orgbind', schema, 'orgbind');
  13. };