|
@@ -11,7 +11,15 @@ const consulting = {
|
|
|
password: { type: Secret, select: false }, // 密码
|
|
|
card: { type: String }, // 身份证号
|
|
|
email: { type: String }, // 电子邮箱
|
|
|
- address: { type: String },
|
|
|
+ address: { type: String }, // 联系地址
|
|
|
+ zwzc: { type: String }, // 职务职称
|
|
|
+ school: { type: String }, // 所在院校
|
|
|
+ major: { type: String }, // 所学专业
|
|
|
+ word_tel: { type: String }, // 办公电话
|
|
|
+ type: { type: String }, // 用户类型:1-咨询师;2-代理师;3-分析师
|
|
|
+ code: { type: String, required: false }, // 邀请码
|
|
|
+ role: { type: String, default: '11' }, // 角色
|
|
|
+ status: { type: String, required: false, default: '0', maxLength: 200 }, // 审核状态,0-注册,1-通过,2-拒绝
|
|
|
remark: { type: String },
|
|
|
};
|
|
|
const schema = new Schema(consulting, { toJSON: { virtuals: true } });
|
|
@@ -20,6 +28,10 @@ schema.index({ pid: 1 });
|
|
|
schema.index({ name: 1 });
|
|
|
schema.index({ phone: 1 });
|
|
|
schema.index({ card: 1 });
|
|
|
+schema.index({ type: 1 });
|
|
|
+schema.index({ code: 1 });
|
|
|
+schema.index({ role: 1 });
|
|
|
+schema.index({ status: 1 });
|
|
|
schema.index({ 'meta.createdAt': 1 });
|
|
|
schema.plugin(metaPlugin);
|
|
|
module.exports = app => {
|