'use strict'; module.exports = app => { const { mongoose } = app; const { Schema } = mongoose; const AdminUserSchema = new Schema({ // 帐号 acct: { type: String, }, // 密码(加密存储) password: { type: String, }, // 用户名 userName: { type: String, }, // 创建时间 createAt: { type: String, }, // 手机号 phone: { type: Number, }, // 用户角色绑定组 roleList: { type: Array, }, // 用户状态 state: { type: String, }, // 用户id id: { type: String, }, // 盐值 salt: { type: String, }, }); return mongoose.model('AdminUser', AdminUserSchema); };