AdminUser.js 747 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. salt: {
  40. type: String,
  41. },
  42. });
  43. return mongoose.model('AdminUser', AdminUserSchema);
  44. };