tango-api-schema 2.4.26 → 2.4.27

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.4.26",
3
+ "version": "2.4.27",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @name api_audit_logs
3
+ */
4
+
5
+ // NPM Modules
6
+ import mongoose from 'mongoose';
7
+
8
+ // Schema
9
+ const vmsauditLogSchema = new mongoose.Schema( {
10
+ userId: {
11
+ type: mongoose.Schema.Types.ObjectId,
12
+ },
13
+ storeId: {
14
+ type: String,
15
+ },
16
+ auditId: {
17
+ type: String,
18
+ },
19
+ fileDate: {
20
+ type: String,
21
+ },
22
+ totalCount: {
23
+ type: Number,
24
+ },
25
+ retagCount: {
26
+ type: Number,
27
+ },
28
+ retagImage: {
29
+ type: Array,
30
+ },
31
+ timeSpent:{
32
+ type:Number
33
+ },
34
+ draftedData:{
35
+ type:Array
36
+ }
37
+ },
38
+ {
39
+ timestamps: true,
40
+ strict: true,
41
+ versionKey: false,
42
+ } );
43
+
44
+ vmsauditLogSchema.index( { createdAt: 1 }, { expires: '3d' } );
45
+
46
+ vmsauditLogSchema.index({ userId:1,storeId: 1,moduleType:1, fileDate:1, auditType:1 });
47
+
48
+ export default mongoose.model( 'vmsauditLog', vmsauditLogSchema, 'vmsauditLog' );
49
+