|
@@ -12,6 +12,7 @@ const user = {
|
|
icon: { type: Array, required: false, zh: '头像' }, //
|
|
icon: { type: Array, required: false, zh: '头像' }, //
|
|
birth: { type: String, required: false, zh: '生日' }, //
|
|
birth: { type: String, required: false, zh: '生日' }, //
|
|
openid: { type: String, required: false, zh: '微信小程序' }, //
|
|
openid: { type: String, required: false, zh: '微信小程序' }, //
|
|
|
|
+ status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:user_type
|
|
};
|
|
};
|
|
const schema = new Schema(user, { toJSON: { getters: true, virtuals: true } });
|
|
const schema = new Schema(user, { toJSON: { getters: true, virtuals: true } });
|
|
schema.index({ id: 1 });
|
|
schema.index({ id: 1 });
|
|
@@ -19,6 +20,7 @@ schema.index({ 'meta.createdAt': 1 });
|
|
schema.index({ name: 1 });
|
|
schema.index({ name: 1 });
|
|
schema.index({ phone: 1 });
|
|
schema.index({ phone: 1 });
|
|
schema.index({ openid: 1 });
|
|
schema.index({ openid: 1 });
|
|
|
|
+schema.index({ status: 1 });
|
|
|
|
|
|
schema.plugin(metaPlugin);
|
|
schema.plugin(metaPlugin);
|
|
|
|
|