tango-api-schema 2.0.116 → 2.0.118
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 +8 -6
- package/package.json +1 -1
- package/schema/assignAudit.model.js +1 -1
- package/schema/{auditFilesCount.model.js → auditClientData.model.js} +5 -4
- package/schema/auditStoreData.model.js +48 -0
- package/schema/billing.model.js +2 -2
- package/schema/store.model.js +4 -0
- package/schema/storeAudit.model.js +54 -0
- package/schema/{audit.model.js → userAudit.model.js} +5 -10
- package/schema/auditLogs.model.js +0 -73
package/index.js
CHANGED
|
@@ -24,12 +24,13 @@ 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
|
|
28
|
-
import
|
|
27
|
+
import userAuditModel from "./schema/userAudit.model.js";
|
|
28
|
+
import storeAuditModel from "./schema/storeAudit.model.js";
|
|
29
29
|
import assignAuditModel from "./schema/assignAudit.model.js";
|
|
30
|
-
import
|
|
30
|
+
import auditStoreDataModel from "./schema/auditStoreData.model.js";
|
|
31
31
|
import matLogModel from "./schema/matLog.model.js";
|
|
32
32
|
import billingModel from "./schema/billing.model.js";
|
|
33
|
+
import auditClientDataModel from "./schema/auditClientData.model.js";
|
|
33
34
|
|
|
34
35
|
export default {
|
|
35
36
|
leadModel,
|
|
@@ -58,10 +59,11 @@ export default {
|
|
|
58
59
|
fittingModel,
|
|
59
60
|
qualityCheckModel,
|
|
60
61
|
taggingModel,
|
|
61
|
-
|
|
62
|
+
userAuditModel,
|
|
63
|
+
storeAuditModel,
|
|
62
64
|
assignAuditModel,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
auditStoreDataModel,
|
|
66
|
+
auditClientDataModel,
|
|
65
67
|
matLogModel,
|
|
66
68
|
billingModel
|
|
67
69
|
};
|
package/package.json
CHANGED
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
// NPM Modules
|
|
6
6
|
import mongoose from 'mongoose';
|
|
7
|
-
import mongooseUniqueValidator from 'mongoose-unique-validator';
|
|
8
7
|
|
|
9
8
|
// Schema
|
|
10
|
-
const
|
|
9
|
+
const auditClientData = new mongoose.Schema( {
|
|
11
10
|
|
|
12
11
|
clientId: {
|
|
13
12
|
type: String,
|
|
@@ -32,6 +31,9 @@ const auditFilesCount = new mongoose.Schema( {
|
|
|
32
31
|
totalFilesCount: {
|
|
33
32
|
type: Number,
|
|
34
33
|
},
|
|
34
|
+
storeList:{
|
|
35
|
+
type:Array
|
|
36
|
+
},
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
timestamps: true,
|
|
@@ -39,6 +41,5 @@ const auditFilesCount = new mongoose.Schema( {
|
|
|
39
41
|
versionKey: false,
|
|
40
42
|
} );
|
|
41
43
|
|
|
42
|
-
auditFilesCount.plugin( mongooseUniqueValidator );
|
|
43
44
|
|
|
44
|
-
export default mongoose.model( '
|
|
45
|
+
export default mongoose.model( 'auditClientData', auditClientData, 'auditClientData' );
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name api_audit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// NPM Modules
|
|
6
|
+
import mongoose from 'mongoose';
|
|
7
|
+
|
|
8
|
+
// Schema
|
|
9
|
+
const auditStoreData = new mongoose.Schema( {
|
|
10
|
+
|
|
11
|
+
clientId: {
|
|
12
|
+
type: String,
|
|
13
|
+
},
|
|
14
|
+
clientName: {
|
|
15
|
+
type: String,
|
|
16
|
+
trim:true
|
|
17
|
+
},
|
|
18
|
+
fileDate: {
|
|
19
|
+
type: String,
|
|
20
|
+
},
|
|
21
|
+
fileDateISO: {
|
|
22
|
+
type: Date,
|
|
23
|
+
},
|
|
24
|
+
queueName: {
|
|
25
|
+
type: String,
|
|
26
|
+
trim:true
|
|
27
|
+
},
|
|
28
|
+
installedStore: {
|
|
29
|
+
type: Number,
|
|
30
|
+
},
|
|
31
|
+
totalFilesCount: {
|
|
32
|
+
type: Number,
|
|
33
|
+
},
|
|
34
|
+
storeId:{
|
|
35
|
+
type:String
|
|
36
|
+
},
|
|
37
|
+
sqs:{
|
|
38
|
+
type:Object
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
timestamps: true,
|
|
43
|
+
strict: true,
|
|
44
|
+
versionKey: false,
|
|
45
|
+
} );
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export default mongoose.model( 'auditStoreData', auditStoreData, 'auditStoreData' );
|
package/schema/billing.model.js
CHANGED
package/schema/store.model.js
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name api_audit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// NPM Modules
|
|
6
|
+
import mongoose from 'mongoose';
|
|
7
|
+
|
|
8
|
+
// Schema
|
|
9
|
+
const storeAuditSchema = new mongoose.Schema( {
|
|
10
|
+
userId: {
|
|
11
|
+
type:Array,
|
|
12
|
+
},
|
|
13
|
+
storeId: {
|
|
14
|
+
type: String,
|
|
15
|
+
},
|
|
16
|
+
auditType: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
fileDate: {
|
|
20
|
+
type: String,
|
|
21
|
+
},
|
|
22
|
+
timeSpent: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0,
|
|
25
|
+
},
|
|
26
|
+
status: {
|
|
27
|
+
type: String,
|
|
28
|
+
enum: [ 'completed', 'inprogress', 'not_assign', 'drafted', 'skipped', 'assigned' ],
|
|
29
|
+
default: 'inprogress',
|
|
30
|
+
},
|
|
31
|
+
beforeCount: {
|
|
32
|
+
type: Number,
|
|
33
|
+
},
|
|
34
|
+
afterCount: {
|
|
35
|
+
type: Number,
|
|
36
|
+
},
|
|
37
|
+
clientId: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
queueName: {
|
|
41
|
+
type: String,
|
|
42
|
+
},
|
|
43
|
+
fileDateISO: {
|
|
44
|
+
type: Date,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
timestamps: true,
|
|
49
|
+
strict: true,
|
|
50
|
+
versionKey: false,
|
|
51
|
+
} );
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
export default mongoose.model( 'storeAudit', storeAuditSchema, 'storeAudit' );
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import mongoose from 'mongoose';
|
|
7
7
|
|
|
8
8
|
// Schema
|
|
9
|
-
const
|
|
9
|
+
const userAuditSchem = new mongoose.Schema( {
|
|
10
10
|
userId: {
|
|
11
11
|
type: mongoose.Schema.Types.ObjectId,
|
|
12
12
|
},
|
|
@@ -33,18 +33,10 @@ const auditSchema = new mongoose.Schema( {
|
|
|
33
33
|
startTime: {
|
|
34
34
|
type: Date,
|
|
35
35
|
},
|
|
36
|
-
storeStatus: {
|
|
37
|
-
type: String,
|
|
38
|
-
enum: [ 'completed', 'inprogress', 'not_assign', 'drafted', 'skipped', 'assigned' ],
|
|
39
|
-
default: 'inprogress',
|
|
40
|
-
},
|
|
41
36
|
auditStatus: {
|
|
42
37
|
type: String,
|
|
43
38
|
enum: [ 'inprogress', 'drafted', 'completed', 'skipped' ],
|
|
44
39
|
},
|
|
45
|
-
storeBC: {
|
|
46
|
-
type: Number,
|
|
47
|
-
},
|
|
48
40
|
beforeCount: {
|
|
49
41
|
type: Number,
|
|
50
42
|
},
|
|
@@ -63,6 +55,9 @@ const auditSchema = new mongoose.Schema( {
|
|
|
63
55
|
fileDateISO: {
|
|
64
56
|
type: Date,
|
|
65
57
|
},
|
|
58
|
+
dueHour: {
|
|
59
|
+
type: String
|
|
60
|
+
}
|
|
66
61
|
},
|
|
67
62
|
{
|
|
68
63
|
timestamps: true,
|
|
@@ -71,4 +66,4 @@ const auditSchema = new mongoose.Schema( {
|
|
|
71
66
|
} );
|
|
72
67
|
|
|
73
68
|
|
|
74
|
-
export default mongoose.model( '
|
|
69
|
+
export default mongoose.model( 'userAudit', userAuditSchem, 'userAudit' );
|
|
@@ -1,73 +0,0 @@
|
|
|
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' );
|