tango-api-schema 2.0.105 → 2.0.107

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/index.js CHANGED
@@ -24,6 +24,10 @@ import dailyPricingModel from "./schema/dailyPricing.model.js";
24
24
  import fittingModel from './schema/fitting.model.js';
25
25
  import qualityCheckModel from './schema/quality.model.js';
26
26
  import taggingModel from "./schema/tagging.model.js";
27
+ import auditModel from "./schema/audit.model.js";
28
+ import auditLogsModel from "./schema/auditLogs.model.js";
29
+ import assignAuditModel from "./schema/assignAudit.model.js";
30
+ import auditFilesCountModel from "./schema/auditFilesCount.model.js";
27
31
 
28
32
  export default {
29
33
  leadModel,
@@ -51,5 +55,9 @@ export default {
51
55
  dailyPricingModel,
52
56
  fittingModel,
53
57
  qualityCheckModel,
54
- taggingModel
58
+ taggingModel,
59
+ auditModel,
60
+ assignAuditModel,
61
+ auditLogsModel,
62
+ auditFilesCountModel
55
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.0.105",
3
+ "version": "2.0.107",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @name api_audit
3
+ */
4
+
5
+ // NPM Modules
6
+ import mongoose from 'mongoose';
7
+
8
+ // Schema
9
+ const assignAudit = new mongoose.Schema( {
10
+ fileId: {
11
+ type: String,
12
+ },
13
+ clientId: {
14
+ type: String,
15
+ },
16
+ fileType: {
17
+ type: String,
18
+ },
19
+ fileDate: {
20
+ type: String,
21
+ },
22
+ fileDateISO: {
23
+ type: Date,
24
+ },
25
+ fileCount: {
26
+ type: Number,
27
+ },
28
+ userId: {
29
+ type: mongoose.Schema.Types.ObjectId,
30
+ ref: 'users',
31
+ },
32
+ queueName: {
33
+ type: String,
34
+ },
35
+ isCompleted: {
36
+ type: Boolean,
37
+ default: false,
38
+ }
39
+ },
40
+ {
41
+ timestamps: true,
42
+ strict: true,
43
+ versionKey: false,
44
+ expires: '6h',
45
+ },
46
+ );
47
+
48
+
49
+ export default mongoose.model( 'assignAudit', assignAudit, 'assignAudit' );
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @name api_audit
3
+ */
4
+
5
+ // NPM Modules
6
+ import mongoose from 'mongoose';
7
+
8
+ // Schema
9
+ const auditSchema = new mongoose.Schema( {
10
+ userId: {
11
+ type: mongoose.Schema.Types.ObjectId,
12
+ },
13
+ storeId: {
14
+ type: String,
15
+ },
16
+ userCommands: {
17
+ type: String,
18
+ },
19
+ isDraft: {
20
+ type: Boolean,
21
+ default: false,
22
+ },
23
+ auditType: {
24
+ type: String,
25
+ },
26
+ fileDate: {
27
+ type: String,
28
+ },
29
+ timeSpent: {
30
+ type: Number,
31
+ default: 0,
32
+ },
33
+ startTime: {
34
+ type: Date,
35
+ },
36
+ storeStatus: {
37
+ type: String,
38
+ enum: [ 'completed', 'inprogress', 'not_assign', 'drafted', 'skipped', 'assigned' ],
39
+ default: 'inprogress',
40
+ },
41
+ auditStatus: {
42
+ type: String,
43
+ enum: [ 'inprogress', 'drafted', 'completed', 'skipped' ],
44
+ },
45
+ storeBC: {
46
+ type: Number,
47
+ },
48
+ beforeCount: {
49
+ type: Number,
50
+ },
51
+ afterCount: {
52
+ type: Number,
53
+ },
54
+ clientId: {
55
+ type: String,
56
+ },
57
+ queueName: {
58
+ type: String,
59
+ },
60
+ endTime: {
61
+ type: Date,
62
+ },
63
+ fileDateISO: {
64
+ type: Date,
65
+ },
66
+ },
67
+ {
68
+ timestamps: true,
69
+ strict: true,
70
+ versionKey: false,
71
+ } );
72
+
73
+
74
+ export default mongoose.model( 'audit', auditSchema, 'audit' );
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @name api_audit
3
+ */
4
+
5
+ // NPM Modules
6
+ import mongoose from 'mongoose';
7
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
8
+
9
+ // Schema
10
+ const auditFilesCount = new mongoose.Schema( {
11
+
12
+ clientId: {
13
+ type: String,
14
+ },
15
+ clientName: {
16
+ type: String,
17
+ trim:true
18
+ },
19
+ fileDate: {
20
+ type: String,
21
+ },
22
+ fileDateISO: {
23
+ type: Date,
24
+ },
25
+ queueName: {
26
+ type: String,
27
+ trim:true
28
+ },
29
+ installedStore: {
30
+ type: Number,
31
+ },
32
+ totalFilesCount: {
33
+ type: Number,
34
+ },
35
+ },
36
+ {
37
+ timestamps: true,
38
+ strict: true,
39
+ versionKey: false,
40
+ } );
41
+
42
+ auditFilesCount.plugin( mongooseUniqueValidator );
43
+
44
+ export default mongoose.model( 'auditFilesCount', auditFilesCount, 'auditFilesCount' );
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @name api_audit_logs
3
+ */
4
+
5
+ // NPM Modules
6
+ import mongoose from 'mongoose';
7
+
8
+ // Schema
9
+ const auditLogs = new mongoose.Schema(
10
+ {
11
+ userId: {
12
+ type: mongoose.Schema.Types.ObjectId,
13
+ },
14
+ storeId: {
15
+ type: String,
16
+ },
17
+ userMsg: {
18
+ type: String,
19
+ },
20
+ auditId: {
21
+ type: mongoose.Schema.Types.ObjectId,
22
+ ref: 'audit',
23
+ },
24
+ auditType: {
25
+ type: String,
26
+ },
27
+ fileDate: {
28
+ type: String,
29
+ },
30
+ clientId: {
31
+ type: mongoose.Schema.Types.ObjectId,
32
+ },
33
+ queueName: {
34
+ type: String,
35
+ },
36
+ totalCount: {
37
+ type: Number,
38
+ },
39
+ junkCount: {
40
+ type: Number,
41
+ },
42
+ junk: {
43
+ type: Array,
44
+ },
45
+ employeeCount: {
46
+ type: Number,
47
+ },
48
+ employee: {
49
+ type: Array,
50
+ },
51
+ customerCount: {
52
+ type: Number,
53
+ },
54
+ customer: {
55
+ type: Array,
56
+ },
57
+ retagImage: {
58
+ type: Array,
59
+ },
60
+ retagCount: {
61
+ type: Number,
62
+ },
63
+ },
64
+ {
65
+ timestamps: true,
66
+ strict: true,
67
+ versionKey: false,
68
+ expires: '2d',
69
+ },
70
+ );
71
+
72
+
73
+ export default mongoose.model( 'auditLogs', auditLogs, 'auditLogs' );