tango-api-schema 2.0.141 → 2.0.143

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
@@ -35,8 +35,8 @@ import auditLogsModel from "./schema/auditLogs.model.js";
35
35
  import internalAuthModel from "./schema/internalAuth.model.js";
36
36
  import paymentAccountModel from "./schema/paymentAccount.model.js";
37
37
  import externalParameterModel from "./schema/externalParameter.model.js";
38
- import userZoneAuditSchema from './schema/userZoneAudit.model.js'
39
38
  import transactionModel from "./schema/transaction.model.js";
39
+ import assignZoneAuditModel from "./schema/assignZoneAudit.model.js";
40
40
 
41
41
  export default {
42
42
  leadModel,
@@ -76,6 +76,6 @@ export default {
76
76
  internalAuthModel,
77
77
  paymentAccountModel,
78
78
  externalParameterModel,
79
- userZoneAuditSchema,
80
- transactionModel
79
+ transactionModel,
80
+ assignZoneAuditModel
81
81
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.0.141",
3
+ "version": "2.0.143",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @name api_audit
3
+ */
4
+
5
+ // NPM Modules
6
+ import mongoose from 'mongoose';
7
+
8
+ // Schema
9
+ const assignZoneAuditModel = new mongoose.Schema( {
10
+ storeId: {
11
+ type: String,
12
+ },
13
+ clientId: {
14
+ type: String,
15
+ },
16
+ auditType: {
17
+ type: String,
18
+ },
19
+ zoneName:{
20
+ type: String,
21
+ },
22
+ fileDate: {
23
+ type: String,
24
+ },
25
+ fileDateISO: {
26
+ type: Date,
27
+ },
28
+ fileCount: {
29
+ type: Number,
30
+ },
31
+ userId: {
32
+ type: mongoose.Schema.Types.ObjectId,
33
+ },
34
+ queueName: {
35
+ type: String,
36
+ },
37
+ isCompleted: {
38
+ type: Boolean,
39
+ default: false,
40
+ }
41
+ },
42
+ {
43
+ timestamps: true,
44
+ strict: true,
45
+ versionKey: false,
46
+ expires: '6h',
47
+ },
48
+ );
49
+
50
+
51
+ export default mongoose.model( 'assignZoneAudit', assignZoneAuditModel, 'assignZoneAudit' );
@@ -6,23 +6,13 @@
6
6
  import mongoose from 'mongoose';
7
7
 
8
8
  // Schema
9
- const userZoneAuditSchema = new mongoose.Schema( {
9
+ const storeZoneAuditSchema = new mongoose.Schema( {
10
10
  userId: {
11
- type: mongoose.Schema.Types.ObjectId,
11
+ type:Array,
12
12
  },
13
13
  storeId: {
14
14
  type: String,
15
15
  },
16
- zoneName:{
17
- type: String,
18
- },
19
- userCommands: {
20
- type: String,
21
- },
22
- isDraft: {
23
- type: Boolean,
24
- default: false,
25
- },
26
16
  auditType: {
27
17
  type: String,
28
18
  },
@@ -33,12 +23,13 @@ const userZoneAuditSchema = new mongoose.Schema( {
33
23
  type: Number,
34
24
  default: 0,
35
25
  },
36
- startTime: {
37
- type: Date,
26
+ zoneName:{
27
+ type: String,
38
28
  },
39
- zoneAuditStatus: {
29
+ status: {
40
30
  type: String,
41
- enum: [ 'inprogress', 'drafted', 'completed', 'skipped' ],
31
+ enum: [ 'completed', 'inprogress', 'not_assign', 'drafted', 'skipped', 'assigned' ],
32
+ default: 'inprogress',
42
33
  },
43
34
  beforeCount: {
44
35
  type: Number,
@@ -52,15 +43,9 @@ const userZoneAuditSchema = new mongoose.Schema( {
52
43
  queueName: {
53
44
  type: String,
54
45
  },
55
- endTime: {
56
- type: Date,
57
- },
58
46
  fileDateISO: {
59
47
  type: Date,
60
48
  },
61
- dueHour: {
62
- type: String
63
- }
64
49
  },
65
50
  {
66
51
  timestamps: true,
@@ -69,4 +54,4 @@ const userZoneAuditSchema = new mongoose.Schema( {
69
54
  } );
70
55
 
71
56
 
72
- export default mongoose.model( 'userZoneAudit', userZoneAuditSchema, 'userZoneAudit' );
57
+ export default mongoose.model( 'storeZoneAudit', storeZoneAuditSchema, 'storeZoneAudit' );
@@ -57,7 +57,14 @@ const userAuditSchem = new mongoose.Schema( {
57
57
  },
58
58
  dueHour: {
59
59
  type: String
60
- }
60
+ },
61
+ moduleType:{
62
+ type: String,
63
+ enum: [ 'traffic', 'zone', ],
64
+ },
65
+ zoneName:{
66
+ type: String,
67
+ },
61
68
  },
62
69
  {
63
70
  timestamps: true,