adminUser.js 464 B

1234567891011121314
  1. 'use strict';
  2. const Schema = require('mongoose').Schema;
  3. const SchemaDefine = {
  4. userName: { type: String, required: true },
  5. password: { type: String, required: true },
  6. openid: { type: String, required: false },
  7. name: { type: String, required: false },
  8. phone: { type: String, required: false },
  9. };
  10. const schema = new Schema(SchemaDefine);
  11. module.exports = app => {
  12. const { mongoose } = app;
  13. return mongoose.model('adminUser', schema, 'adminUser');
  14. };