userBindRole.js 336 B

1234567891011
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const SchemaDefine = {
  4. roleCode: { type: String, required: true },
  5. userId: { type: String, required: true },
  6. };
  7. const schema = new Schema(SchemaDefine);
  8. module.exports = app => {
  9. const { mongoose } = app;
  10. return mongoose.model('userBindRole', schema, 'userBindRole');
  11. };