优化了agent
This commit is contained in:
@@ -249,8 +249,7 @@ EmployeeSchema.statics.findOnlineAttendants = async function (options = {}) {
|
||||
// ==================== 索引定义 ====================
|
||||
|
||||
EmployeeSchema.index({ "profile.name": 1 });
|
||||
EmployeeSchema.index({ employeeNo: 1 });
|
||||
EmployeeSchema.index({ userId: 1 });
|
||||
// 注意:employeeNo(unique+sparse)与 userId 的索引在字段定义处声明,勿在此重复声明
|
||||
EmployeeSchema.index({ orgId: 1, role: 1, status: 1 });
|
||||
EmployeeSchema.index({ role: 1, status: 1 });
|
||||
EmployeeSchema.index({ "profile.phone": 1 });
|
||||
|
||||
@@ -192,8 +192,6 @@ HealthProfileSchema.statics.deleteProfileById = async function (id) {
|
||||
};
|
||||
|
||||
// ==================== 索引定义 ====================
|
||||
|
||||
HealthProfileSchema.index({ userId: 1 }, { sparse: true });
|
||||
HealthProfileSchema.index({ "profile.mobile": 1 });
|
||||
// 注意:userId(sparse)与 profile.mobile 的索引在字段定义处声明,勿在此重复声明
|
||||
|
||||
export { HealthProfileSchema, genPinyin, genPinyinFL };
|
||||
@@ -196,8 +196,7 @@ OrganizationSchema.statics.updateOrg = async function (id, update) {
|
||||
|
||||
// ==================== 索引定义 ====================
|
||||
|
||||
OrganizationSchema.index({ name: 1 });
|
||||
OrganizationSchema.index({ code: 1 });
|
||||
// 注意:name 与 code(unique+sparse)的索引在字段定义处声明,勿在此重复声明
|
||||
OrganizationSchema.index({ type: 1, status: 1 });
|
||||
OrganizationSchema.index({ "address.city": 1, "address.district": 1 });
|
||||
OrganizationSchema.index({ status: 1 });
|
||||
|
||||
Reference in New Issue
Block a user