tango-api-schema 2.1.27 → 2.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.1.27",
3
+ "version": "2.1.29",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -51,5 +51,6 @@ const assignAudit = new mongoose.Schema( {
51
51
  },
52
52
  );
53
53
 
54
+ assignAudit.index({ clientId:1,storeId: 1,moduleType:1, fileDate:1, auditType:1 });
54
55
 
55
56
  export default mongoose.model( 'assignAudit', assignAudit, 'assignAudit' );
@@ -6,7 +6,7 @@
6
6
  import mongoose from 'mongoose';
7
7
 
8
8
  // Schema
9
- const auditLogSchem = new mongoose.Schema( {
9
+ const auditLogSchema = new mongoose.Schema( {
10
10
  userId: {
11
11
  type: mongoose.Schema.Types.ObjectId,
12
12
  },
@@ -67,6 +67,7 @@ const auditLogSchem = new mongoose.Schema( {
67
67
  expires: '3d',
68
68
  } );
69
69
 
70
+ auditLogSchema.index({ userId:1,storeId: 1,moduleType:1, fileDate:1, auditType:1 });
70
71
 
71
- export default mongoose.model( 'auditLog', auditLogSchem, 'auditLog' );
72
+ export default mongoose.model( 'auditLog', auditLogSchema, 'auditLog' );
72
73
 
@@ -51,5 +51,6 @@ const auditStoreData = new mongoose.Schema( {
51
51
  versionKey: false,
52
52
  } );
53
53
 
54
+ auditStoreData.index({ storeId: 1,moduleType:1, fileDate:1,});
54
55
 
55
56
  export default mongoose.model( 'auditStoreData', auditStoreData, 'auditStoreData' );
@@ -76,7 +76,8 @@ const auditUserWalletSchema = new mongoose.Schema( {
76
76
 
77
77
  auditUserWalletSchema.index({
78
78
  userEmail: 1,
79
- date: 1,
79
+ fileDate: 1,
80
+ fileDateISO:1,
80
81
  moduleType:1
81
82
  });
82
83
 
@@ -10,6 +10,9 @@ const empDetectionOutputSchema = new mongoose.Schema( {
10
10
  userId: {
11
11
  type: mongoose.Schema.Types.ObjectId,
12
12
  },
13
+ clientId:{
14
+ type:String
15
+ },
13
16
  storeId: {
14
17
  type: String,
15
18
  },
@@ -57,5 +57,6 @@ const storeAuditSchema = new mongoose.Schema( {
57
57
  versionKey: false,
58
58
  } );
59
59
 
60
+ storeAuditSchema.index({clientId:1, storeId: 1,moduleType:1, fileDate:1,fileDateISO:1});
60
61
 
61
62
  export default mongoose.model( 'storeAudit', storeAuditSchema, 'storeAudit' );
@@ -57,5 +57,6 @@ const storeEmpDetectionSchema = new mongoose.Schema( {
57
57
  versionKey: false,
58
58
  } );
59
59
 
60
+ storeEmpDetectionSchema.index({clientId:1, storeId: 1,moduleType:1, fileDate:1,fileDateISO:1});
60
61
 
61
62
  export default mongoose.model( 'storeEmpDetection', storeEmpDetectionSchema, 'storeEmpDetection' );
@@ -53,6 +53,7 @@ const traxAuditData = new mongoose.Schema( {
53
53
  versionKey: false,
54
54
  } );
55
55
 
56
+ traxAuditData.index({ storeId: 1,moduleType:1, fileDate:1,clientId:1});
56
57
 
57
58
  export default mongoose.model( 'traxAuditData', traxAuditData, 'traxAuditData' );
58
59
 
@@ -72,5 +72,6 @@ const userAuditSchem = new mongoose.Schema( {
72
72
  versionKey: false,
73
73
  } );
74
74
 
75
+ userAuditSchem.index({ storeId: 1,moduleType:1, fileDate:1,clientId:1,userId:1, auditType:1, fileDateISO:1});
75
76
 
76
77
  export default mongoose.model( 'userAudit', userAuditSchem, 'userAudit' );
@@ -76,5 +76,6 @@ type:String
76
76
  versionKey: false,
77
77
  } );
78
78
 
79
+ userEmpDetectionSchema.index({ storeId: 1,moduleType:1, fileDate:1,clientId:1,userId:1, auditType:1, fileDateISO:1});
79
80
 
80
81
  export default mongoose.model( 'userEmpDetection', userEmpDetectionSchema, 'userEmpDetection' );