'use strict'; module.exports = app => { const mongoose = app.mongoose; const Schema = mongoose.Schema; const SysUserSchema = new Schema({ // 补全信息新添字段 IsComparison: { type: String }, // 是否已人脸比对,1已比对成功 IsPerfect: { type: String }, // 是否已完善信息,1已完善 time: { type: Date, default: Date.now }, // 修改时间 headPicPath: { type: String }, // 头像上传地址 idCardNumber: { type: String }, // 身份证号码 idCardPicPath: { type: String }, // 身份证上传地址 age: { type: String }, // 年龄 education: { type: String }, // 学历 income: { type: String }, // 收入 loginName: { type: String }, loginPwd: { type: String }, userName: { type: String }, sex: { type: String }, company: { type: String }, // 所在单位 job: { type: String }, // 职务 politicalOutlook: { type: String }, // 政治面貌 phone: { type: String }, // 联系电话 status: { type: String }, openId: { type: String }, // 微信公众号 用户openid appletsId: { type: String }, // 小程序 用户openid file: { type: String }, // 认证文件 dept1: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept2: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept3: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept4: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept5: { type: Schema.Types.ObjectId, ref: 'sysDept', }, dept: { type: Schema.Types.ObjectId, ref: 'sysDept', }, role: { type: Schema.Types.ObjectId, ref: 'sysRole', }, }); return mongoose.model('sysUser', SysUserSchema, 'sys_user'); };