tango-api-schema 1.0.79 → 1.0.80
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 +85 -83
- package/package.json +27 -27
- package/schema/activitylog.model.js +42 -42
- package/schema/applicationDefault.model.js +24 -24
- package/schema/dailyWorkLog.model.js +152 -152
- package/schema/dlProcessedDaily.model.js +507 -507
- package/schema/dlZone.model.js +135 -135
- package/schema/edgeappVersion.model.js +23 -23
- package/schema/eyeTest.model.js +19 -19
- package/schema/eyeTestData.model.js +44 -44
- package/schema/finance.model.js +100 -100
- package/schema/hotjar.model.js +19 -19
- package/schema/liveDetectionData.model.js +38 -38
- package/schema/liveProcessedData.model.js +359 -359
- package/schema/noSourceNormalizedDaily.model.js +568 -568
- package/schema/noSourceNormalizedHourly.model.js +185 -185
- package/schema/nobHourly.model.js +47 -47
- package/schema/normalizedProcessHour.model.js +186 -186
- package/schema/normalizedProcessedDaily.model.js +559 -559
- package/schema/planoCrestLog.model.js +18 -0
- package/schema/processedCheckList.model.js +164 -164
- package/schema/processedDaily.model.js +569 -569
- package/schema/processedDetection.model.js +77 -77
- package/schema/processedHourly.model.js +186 -186
- package/schema/reportParameter.model.js +13 -13
- package/schema/revop.model.js +92 -92
- package/schema/source.model.js +8 -8
- package/schema/sourceNormalizedDaily.model.js +565 -565
- package/schema/sourceNormalizedHourly.model.js +193 -193
- package/schema/storeOperation.model.js +65 -65
- package/schema/ticket.model.js +113 -113
- package/schema/user.model.js +95 -95
- package/schema/userRole.model.js +28 -28
- package/schema/zone.model.js +209 -209
package/index.js
CHANGED
|
@@ -1,83 +1,85 @@
|
|
|
1
|
-
import brandModel from "./schema/brand.model.js";
|
|
2
|
-
import storeModel from "./schema/stores.model.js";
|
|
3
|
-
import cameraModel from "./schema/camera.model.js";
|
|
4
|
-
import clientModel from "./schema/client.model.js";
|
|
5
|
-
import dailyAuditFilesModel from "./schema/dailyAuditFiles.model.js";
|
|
6
|
-
import dailyAuditStoreFilesModel from "./schema/dailyAuditStoreFiles.model.js";
|
|
7
|
-
import tokenModel from "./schema/token.model.js";
|
|
8
|
-
import nobModel from './schema/nob.model.js';
|
|
9
|
-
import nobClientModel from './schema/nobClient.model.js';
|
|
10
|
-
import applicationDefaultModel from "./schema/applicationDefault.model.js";
|
|
11
|
-
import userModel from "./schema/user.model.js";
|
|
12
|
-
import userRoleModel from "./schema/userRole.model.js";
|
|
13
|
-
import edgeappVersionModel from "./schema/edgeappVersion.model.js";
|
|
14
|
-
import nobHourlyModel from "./schema/nobHourly.model.js";
|
|
15
|
-
import processedCheckListModel from "./schema/processedCheckList.model.js";
|
|
16
|
-
import processedDetectionModel from "./schema/processedDetection.model.js";
|
|
17
|
-
import processedDailyModel from "./schema/processedDaily.model.js";
|
|
18
|
-
import processedHourlyModel from "./schema/processedHourly.model.js";
|
|
19
|
-
import dlProcessedDailyModel from "./schema/dlProcessedDaily.model.js";
|
|
20
|
-
import normalizedProcessHourModel from "./schema/normalizedProcessHour.model.js";
|
|
21
|
-
import normalizedProcessedDailyModel from "./schema/normalizedProcessedDaily.model.js";
|
|
22
|
-
import noSourceNormalizedDailyModel from "./schema/noSourceNormalizedDaily.model.js";
|
|
23
|
-
import noSourceNormalizedHourlyModel from "./schema/noSourceNormalizedHourly.model.js";
|
|
24
|
-
import sourceNormalizedDailyModel from "./schema/sourceNormalizedDaily.model.js";
|
|
25
|
-
import sourceNormalizedHourlyModel from "./schema/sourceNormalizedHourly.model.js";
|
|
26
|
-
import sourceModel from "./schema/source.model.js";
|
|
27
|
-
import zoneModel from "./schema/zone.model.js";
|
|
28
|
-
import revopModel from "./schema/revop.model.js";
|
|
29
|
-
import storeOperationModel from "./schema/storeOperation.model.js";
|
|
30
|
-
import liveDetectionDataModel from "./schema/liveDetectionData.model.js";
|
|
31
|
-
import liveProcessedDataModel from "./schema/liveProcessedData.model.js";
|
|
32
|
-
import reportParameterModel from "./schema/reportParameter.model.js";
|
|
33
|
-
import dlZoneModel from "./schema/dlZone.model.js";
|
|
34
|
-
import eyeTestModel from './schema/eyeTest.model.js';
|
|
35
|
-
import ticketModel from "./schema/ticket.model.js";
|
|
36
|
-
import activitylogModel from "./schema/activitylog.model.js";
|
|
37
|
-
import dailyWorkLogModel from "./schema/dailyWorkLog.model.js";
|
|
38
|
-
import financeModel from "./schema/finance.model.js";
|
|
39
|
-
import eyeTestDataModel from "./schema/eyeTestData.model.js";
|
|
40
|
-
import hotjarModel from "./schema/hotjar.model.js";
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
import brandModel from "./schema/brand.model.js";
|
|
2
|
+
import storeModel from "./schema/stores.model.js";
|
|
3
|
+
import cameraModel from "./schema/camera.model.js";
|
|
4
|
+
import clientModel from "./schema/client.model.js";
|
|
5
|
+
import dailyAuditFilesModel from "./schema/dailyAuditFiles.model.js";
|
|
6
|
+
import dailyAuditStoreFilesModel from "./schema/dailyAuditStoreFiles.model.js";
|
|
7
|
+
import tokenModel from "./schema/token.model.js";
|
|
8
|
+
import nobModel from './schema/nob.model.js';
|
|
9
|
+
import nobClientModel from './schema/nobClient.model.js';
|
|
10
|
+
import applicationDefaultModel from "./schema/applicationDefault.model.js";
|
|
11
|
+
import userModel from "./schema/user.model.js";
|
|
12
|
+
import userRoleModel from "./schema/userRole.model.js";
|
|
13
|
+
import edgeappVersionModel from "./schema/edgeappVersion.model.js";
|
|
14
|
+
import nobHourlyModel from "./schema/nobHourly.model.js";
|
|
15
|
+
import processedCheckListModel from "./schema/processedCheckList.model.js";
|
|
16
|
+
import processedDetectionModel from "./schema/processedDetection.model.js";
|
|
17
|
+
import processedDailyModel from "./schema/processedDaily.model.js";
|
|
18
|
+
import processedHourlyModel from "./schema/processedHourly.model.js";
|
|
19
|
+
import dlProcessedDailyModel from "./schema/dlProcessedDaily.model.js";
|
|
20
|
+
import normalizedProcessHourModel from "./schema/normalizedProcessHour.model.js";
|
|
21
|
+
import normalizedProcessedDailyModel from "./schema/normalizedProcessedDaily.model.js";
|
|
22
|
+
import noSourceNormalizedDailyModel from "./schema/noSourceNormalizedDaily.model.js";
|
|
23
|
+
import noSourceNormalizedHourlyModel from "./schema/noSourceNormalizedHourly.model.js";
|
|
24
|
+
import sourceNormalizedDailyModel from "./schema/sourceNormalizedDaily.model.js";
|
|
25
|
+
import sourceNormalizedHourlyModel from "./schema/sourceNormalizedHourly.model.js";
|
|
26
|
+
import sourceModel from "./schema/source.model.js";
|
|
27
|
+
import zoneModel from "./schema/zone.model.js";
|
|
28
|
+
import revopModel from "./schema/revop.model.js";
|
|
29
|
+
import storeOperationModel from "./schema/storeOperation.model.js";
|
|
30
|
+
import liveDetectionDataModel from "./schema/liveDetectionData.model.js";
|
|
31
|
+
import liveProcessedDataModel from "./schema/liveProcessedData.model.js";
|
|
32
|
+
import reportParameterModel from "./schema/reportParameter.model.js";
|
|
33
|
+
import dlZoneModel from "./schema/dlZone.model.js";
|
|
34
|
+
import eyeTestModel from './schema/eyeTest.model.js';
|
|
35
|
+
import ticketModel from "./schema/ticket.model.js";
|
|
36
|
+
import activitylogModel from "./schema/activitylog.model.js";
|
|
37
|
+
import dailyWorkLogModel from "./schema/dailyWorkLog.model.js";
|
|
38
|
+
import financeModel from "./schema/finance.model.js";
|
|
39
|
+
import eyeTestDataModel from "./schema/eyeTestData.model.js";
|
|
40
|
+
import hotjarModel from "./schema/hotjar.model.js";
|
|
41
|
+
import planoCrestLogModel from './schema/planoCrestLog.model.js';
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
clientModel,
|
|
45
|
+
cameraModel,
|
|
46
|
+
storeModel,
|
|
47
|
+
brandModel,
|
|
48
|
+
dailyAuditFilesModel,
|
|
49
|
+
dailyAuditStoreFilesModel,
|
|
50
|
+
tokenModel,
|
|
51
|
+
nobModel,
|
|
52
|
+
nobClientModel,
|
|
53
|
+
applicationDefaultModel,
|
|
54
|
+
userModel,
|
|
55
|
+
userRoleModel,
|
|
56
|
+
edgeappVersionModel,
|
|
57
|
+
nobHourlyModel,
|
|
58
|
+
processedCheckListModel,
|
|
59
|
+
processedDetectionModel,
|
|
60
|
+
processedDailyModel,
|
|
61
|
+
processedHourlyModel,
|
|
62
|
+
dlProcessedDailyModel,
|
|
63
|
+
normalizedProcessHourModel,
|
|
64
|
+
normalizedProcessedDailyModel,
|
|
65
|
+
noSourceNormalizedDailyModel,
|
|
66
|
+
noSourceNormalizedHourlyModel,
|
|
67
|
+
sourceNormalizedDailyModel,
|
|
68
|
+
sourceNormalizedHourlyModel,
|
|
69
|
+
sourceModel,
|
|
70
|
+
zoneModel,
|
|
71
|
+
revopModel,
|
|
72
|
+
storeOperationModel,
|
|
73
|
+
liveDetectionDataModel,
|
|
74
|
+
liveProcessedDataModel,
|
|
75
|
+
reportParameterModel,
|
|
76
|
+
dlZoneModel,
|
|
77
|
+
eyeTestModel,
|
|
78
|
+
ticketModel,
|
|
79
|
+
activitylogModel,
|
|
80
|
+
dailyWorkLogModel,
|
|
81
|
+
financeModel,
|
|
82
|
+
eyeTestDataModel,
|
|
83
|
+
hotjarModel,
|
|
84
|
+
planoCrestLogModel
|
|
85
|
+
};
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tango-api-schema",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "tangoEye model schema",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"start": "node index.js"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://praveen22raj@bitbucket.org/tangoeye-retail/tango-api-schema.git"
|
|
14
|
-
},
|
|
15
|
-
"author": "praveenraj",
|
|
16
|
-
"license": "ISC",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://bitbucket.org/tangoeye-retail/tango-api-schema/issues"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "https://bitbucket.org/tangoeye-retail/tango-api-schema#readme",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"express": "^4.18.2",
|
|
23
|
-
"mongoose": "^7.5.3",
|
|
24
|
-
"mongoose-unique-validator": "^4.0.0",
|
|
25
|
-
"nodemon": "^3.0.1"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tango-api-schema",
|
|
3
|
+
"version": "1.0.80",
|
|
4
|
+
"description": "tangoEye model schema",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"start": "node index.js"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://praveen22raj@bitbucket.org/tangoeye-retail/tango-api-schema.git"
|
|
14
|
+
},
|
|
15
|
+
"author": "praveenraj",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://bitbucket.org/tangoeye-retail/tango-api-schema/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://bitbucket.org/tangoeye-retail/tango-api-schema#readme",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"express": "^4.18.2",
|
|
23
|
+
"mongoose": "^7.5.3",
|
|
24
|
+
"mongoose-unique-validator": "^4.0.0",
|
|
25
|
+
"nodemon": "^3.0.1"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name api_activity_logs
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// NPM Modules
|
|
6
|
-
import { Schema, model } from 'mongoose';
|
|
7
|
-
|
|
8
|
-
// Schema
|
|
9
|
-
const activityLogs = new Schema(
|
|
10
|
-
{
|
|
11
|
-
userId: {
|
|
12
|
-
type: Schema.Types.ObjectId,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
userName: {
|
|
16
|
-
type: String,
|
|
17
|
-
},
|
|
18
|
-
Date: {
|
|
19
|
-
type: Date,
|
|
20
|
-
},
|
|
21
|
-
logType: {
|
|
22
|
-
type: String,
|
|
23
|
-
enum: [ 'audit', 'infra', 'queries', 'admin', 'installation', 'report', 'live' ],
|
|
24
|
-
},
|
|
25
|
-
logSubType: {
|
|
26
|
-
type: String,
|
|
27
|
-
enum: [ 'auditStart', 'auditDone', 'auditDraft', 'reAuditPush', 'reTrigger', 'infraInit', 'infraClose', 'installInit', 'installClose', 'roleUpdation',
|
|
28
|
-
'roleCreation', 'uploadReport', 'generateReport', 'sendReport', 'pendingFromClient', 'pendingFromTango' ],
|
|
29
|
-
},
|
|
30
|
-
logData: {
|
|
31
|
-
type: Object,
|
|
32
|
-
default: {},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
timestamps: true,
|
|
37
|
-
strict: true,
|
|
38
|
-
versionKey: false,
|
|
39
|
-
},
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export default model( 'activity_logs', activityLogs );
|
|
1
|
+
/**
|
|
2
|
+
* @name api_activity_logs
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// NPM Modules
|
|
6
|
+
import { Schema, model } from 'mongoose';
|
|
7
|
+
|
|
8
|
+
// Schema
|
|
9
|
+
const activityLogs = new Schema(
|
|
10
|
+
{
|
|
11
|
+
userId: {
|
|
12
|
+
type: Schema.Types.ObjectId,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
userName: {
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
Date: {
|
|
19
|
+
type: Date,
|
|
20
|
+
},
|
|
21
|
+
logType: {
|
|
22
|
+
type: String,
|
|
23
|
+
enum: [ 'audit', 'infra', 'queries', 'admin', 'installation', 'report', 'live' ],
|
|
24
|
+
},
|
|
25
|
+
logSubType: {
|
|
26
|
+
type: String,
|
|
27
|
+
enum: [ 'auditStart', 'auditDone', 'auditDraft', 'reAuditPush', 'reTrigger', 'infraInit', 'infraClose', 'installInit', 'installClose', 'roleUpdation',
|
|
28
|
+
'roleCreation', 'uploadReport', 'generateReport', 'sendReport', 'pendingFromClient', 'pendingFromTango' ],
|
|
29
|
+
},
|
|
30
|
+
logData: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: {},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
timestamps: true,
|
|
37
|
+
strict: true,
|
|
38
|
+
versionKey: false,
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export default model( 'activity_logs', activityLogs );
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
|
|
3
|
-
const collection = new mongoose.Schema(
|
|
4
|
-
{
|
|
5
|
-
type: {
|
|
6
|
-
type: String,
|
|
7
|
-
},
|
|
8
|
-
subType: {
|
|
9
|
-
type: String,
|
|
10
|
-
},
|
|
11
|
-
data: {
|
|
12
|
-
type: Object,
|
|
13
|
-
},
|
|
14
|
-
active: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
timestamps: true,
|
|
20
|
-
strict: true,
|
|
21
|
-
versionKey: false,
|
|
22
|
-
} );
|
|
23
|
-
|
|
24
|
-
export default mongoose.model( 'applicationDefault', collection );
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const collection = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
},
|
|
8
|
+
subType: {
|
|
9
|
+
type: String,
|
|
10
|
+
},
|
|
11
|
+
data: {
|
|
12
|
+
type: Object,
|
|
13
|
+
},
|
|
14
|
+
active: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
timestamps: true,
|
|
20
|
+
strict: true,
|
|
21
|
+
versionKey: false,
|
|
22
|
+
} );
|
|
23
|
+
|
|
24
|
+
export default mongoose.model( 'applicationDefault', collection );
|
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
import mongoose from 'mongoose';
|
|
2
|
-
|
|
3
|
-
// Model
|
|
4
|
-
const collection = new mongoose.Schema(
|
|
5
|
-
{
|
|
6
|
-
clientId: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
storeId: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
storeName: {
|
|
15
|
-
type: String,
|
|
16
|
-
},
|
|
17
|
-
storeDate: {
|
|
18
|
-
type: String,
|
|
19
|
-
required: true,
|
|
20
|
-
},
|
|
21
|
-
storeDateISO: {
|
|
22
|
-
type: Date,
|
|
23
|
-
},
|
|
24
|
-
employee_id: {
|
|
25
|
-
type: String,
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
employee_org_id: {
|
|
29
|
-
type: String,
|
|
30
|
-
},
|
|
31
|
-
employee_name: {
|
|
32
|
-
type: String,
|
|
33
|
-
},
|
|
34
|
-
employee_entry_time: {
|
|
35
|
-
type: String,
|
|
36
|
-
},
|
|
37
|
-
employee_exit_time: {
|
|
38
|
-
type: String,
|
|
39
|
-
},
|
|
40
|
-
employee_productive_time: {
|
|
41
|
-
type: Number,
|
|
42
|
-
},
|
|
43
|
-
employee_break_time: {
|
|
44
|
-
type: Number,
|
|
45
|
-
},
|
|
46
|
-
avg_time_taken_to_assist_in_secs: {
|
|
47
|
-
type: Number,
|
|
48
|
-
},
|
|
49
|
-
avg_time_spent_with_customers_in_mins: {
|
|
50
|
-
type: Number,
|
|
51
|
-
},
|
|
52
|
-
total_customers_attended: {
|
|
53
|
-
type: Number,
|
|
54
|
-
},
|
|
55
|
-
avg_assist_and_timespent_in_zones: [
|
|
56
|
-
{
|
|
57
|
-
zone_name: {
|
|
58
|
-
type: String,
|
|
59
|
-
},
|
|
60
|
-
avg_assist_time: {
|
|
61
|
-
type: Number,
|
|
62
|
-
},
|
|
63
|
-
avg_timespent_time: {
|
|
64
|
-
type: Number,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
demographics: [
|
|
69
|
-
{
|
|
70
|
-
customer_id: {
|
|
71
|
-
type: Number,
|
|
72
|
-
},
|
|
73
|
-
customer_age: {
|
|
74
|
-
type: Number,
|
|
75
|
-
},
|
|
76
|
-
customer_gender: {
|
|
77
|
-
type: String,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
assist_and_timespent_data: [
|
|
82
|
-
{
|
|
83
|
-
customer_id: {
|
|
84
|
-
type: Number,
|
|
85
|
-
},
|
|
86
|
-
customer_entry_time: {
|
|
87
|
-
type: String,
|
|
88
|
-
},
|
|
89
|
-
customer_exit_time: {
|
|
90
|
-
type: String,
|
|
91
|
-
},
|
|
92
|
-
staff_assisted_time: {
|
|
93
|
-
type: String,
|
|
94
|
-
},
|
|
95
|
-
time_taken_to_assist_in_secs: {
|
|
96
|
-
type: Number,
|
|
97
|
-
},
|
|
98
|
-
timespent_with_customer_in_secs: {
|
|
99
|
-
type: Number,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
zone_timespent_and_assisted_data: [
|
|
104
|
-
{
|
|
105
|
-
zone_name: {
|
|
106
|
-
type: String,
|
|
107
|
-
},
|
|
108
|
-
customer_details: [
|
|
109
|
-
{
|
|
110
|
-
customer_id: {
|
|
111
|
-
type: Number,
|
|
112
|
-
},
|
|
113
|
-
cust_first_entry_time_in_zone: {
|
|
114
|
-
type: String,
|
|
115
|
-
},
|
|
116
|
-
cust_last_exit_time_in_zone: {
|
|
117
|
-
type: String,
|
|
118
|
-
},
|
|
119
|
-
staff_assisted_time_in_zone: {
|
|
120
|
-
type: String,
|
|
121
|
-
},
|
|
122
|
-
time_taken_to_assist_in_zone: {
|
|
123
|
-
type: Number,
|
|
124
|
-
},
|
|
125
|
-
time_spent_in_zone: {
|
|
126
|
-
type: Number,
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
],
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
],
|
|
133
|
-
total_customers_attended_after_threshold:{
|
|
134
|
-
type: Number,
|
|
135
|
-
},
|
|
136
|
-
total_unattended_customers:{
|
|
137
|
-
type: Number,
|
|
138
|
-
},
|
|
139
|
-
unattended_customers_data:{
|
|
140
|
-
type: Array,
|
|
141
|
-
},
|
|
142
|
-
staff_to_cust_ratio:{
|
|
143
|
-
type: String,
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
timestamps: true,
|
|
148
|
-
strict: true,
|
|
149
|
-
versionKey: false,
|
|
150
|
-
},
|
|
151
|
-
);
|
|
152
|
-
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
// Model
|
|
4
|
+
const collection = new mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
clientId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
storeId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
storeName: {
|
|
15
|
+
type: String,
|
|
16
|
+
},
|
|
17
|
+
storeDate: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
storeDateISO: {
|
|
22
|
+
type: Date,
|
|
23
|
+
},
|
|
24
|
+
employee_id: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
employee_org_id: {
|
|
29
|
+
type: String,
|
|
30
|
+
},
|
|
31
|
+
employee_name: {
|
|
32
|
+
type: String,
|
|
33
|
+
},
|
|
34
|
+
employee_entry_time: {
|
|
35
|
+
type: String,
|
|
36
|
+
},
|
|
37
|
+
employee_exit_time: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
employee_productive_time: {
|
|
41
|
+
type: Number,
|
|
42
|
+
},
|
|
43
|
+
employee_break_time: {
|
|
44
|
+
type: Number,
|
|
45
|
+
},
|
|
46
|
+
avg_time_taken_to_assist_in_secs: {
|
|
47
|
+
type: Number,
|
|
48
|
+
},
|
|
49
|
+
avg_time_spent_with_customers_in_mins: {
|
|
50
|
+
type: Number,
|
|
51
|
+
},
|
|
52
|
+
total_customers_attended: {
|
|
53
|
+
type: Number,
|
|
54
|
+
},
|
|
55
|
+
avg_assist_and_timespent_in_zones: [
|
|
56
|
+
{
|
|
57
|
+
zone_name: {
|
|
58
|
+
type: String,
|
|
59
|
+
},
|
|
60
|
+
avg_assist_time: {
|
|
61
|
+
type: Number,
|
|
62
|
+
},
|
|
63
|
+
avg_timespent_time: {
|
|
64
|
+
type: Number,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
demographics: [
|
|
69
|
+
{
|
|
70
|
+
customer_id: {
|
|
71
|
+
type: Number,
|
|
72
|
+
},
|
|
73
|
+
customer_age: {
|
|
74
|
+
type: Number,
|
|
75
|
+
},
|
|
76
|
+
customer_gender: {
|
|
77
|
+
type: String,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
assist_and_timespent_data: [
|
|
82
|
+
{
|
|
83
|
+
customer_id: {
|
|
84
|
+
type: Number,
|
|
85
|
+
},
|
|
86
|
+
customer_entry_time: {
|
|
87
|
+
type: String,
|
|
88
|
+
},
|
|
89
|
+
customer_exit_time: {
|
|
90
|
+
type: String,
|
|
91
|
+
},
|
|
92
|
+
staff_assisted_time: {
|
|
93
|
+
type: String,
|
|
94
|
+
},
|
|
95
|
+
time_taken_to_assist_in_secs: {
|
|
96
|
+
type: Number,
|
|
97
|
+
},
|
|
98
|
+
timespent_with_customer_in_secs: {
|
|
99
|
+
type: Number,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
zone_timespent_and_assisted_data: [
|
|
104
|
+
{
|
|
105
|
+
zone_name: {
|
|
106
|
+
type: String,
|
|
107
|
+
},
|
|
108
|
+
customer_details: [
|
|
109
|
+
{
|
|
110
|
+
customer_id: {
|
|
111
|
+
type: Number,
|
|
112
|
+
},
|
|
113
|
+
cust_first_entry_time_in_zone: {
|
|
114
|
+
type: String,
|
|
115
|
+
},
|
|
116
|
+
cust_last_exit_time_in_zone: {
|
|
117
|
+
type: String,
|
|
118
|
+
},
|
|
119
|
+
staff_assisted_time_in_zone: {
|
|
120
|
+
type: String,
|
|
121
|
+
},
|
|
122
|
+
time_taken_to_assist_in_zone: {
|
|
123
|
+
type: Number,
|
|
124
|
+
},
|
|
125
|
+
time_spent_in_zone: {
|
|
126
|
+
type: Number,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
],
|
|
133
|
+
total_customers_attended_after_threshold:{
|
|
134
|
+
type: Number,
|
|
135
|
+
},
|
|
136
|
+
total_unattended_customers:{
|
|
137
|
+
type: Number,
|
|
138
|
+
},
|
|
139
|
+
unattended_customers_data:{
|
|
140
|
+
type: Array,
|
|
141
|
+
},
|
|
142
|
+
staff_to_cust_ratio:{
|
|
143
|
+
type: String,
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
timestamps: true,
|
|
148
|
+
strict: true,
|
|
149
|
+
versionKey: false,
|
|
150
|
+
},
|
|
151
|
+
);
|
|
152
|
+
|
|
153
153
|
export default mongoose.model( 'dailyWorkLog', collection );
|