AdminUser.js 694 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. 'use strict';
  2. module.exports = app => {
  3. const { mongoose } = app;
  4. const { Schema } = mongoose;
  5. const AdminUserSchema = new Schema({
  6. // 帐号
  7. acct: {
  8. type: String,
  9. },
  10. // 密码(加密存储)
  11. password: {
  12. type: String,
  13. },
  14. // 用户名
  15. userName: {
  16. type: String,
  17. },
  18. // 创建时间
  19. createAt: {
  20. type: String,
  21. },
  22. // 手机号
  23. phone: {
  24. type: Number,
  25. },
  26. // 用户角色绑定组
  27. roleList: {
  28. type: Array,
  29. },
  30. // 用户状态
  31. state: {
  32. type: String,
  33. },
  34. // 用户id
  35. id: {
  36. type: String,
  37. },
  38. });
  39. return mongoose.model('AdminUser', AdminUserSchema);
  40. };