tango-api-schema 2.1.42 → 2.1.44
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 +17 -1
- package/package.json +1 -1
- package/schema/checklistassignconfig.js +72 -0
- package/schema/checklistconfig.js +168 -0
- package/schema/checklistlog.js +60 -0
- package/schema/checklistquestionconfig.js +148 -0
- package/schema/domain.js +19 -0
- package/schema/processedchecklist.js +185 -0
- package/schema/processedchecklistconfig.js +106 -0
- package/schema/processeddetection.js +86 -0
package/index.js
CHANGED
|
@@ -47,6 +47,14 @@ import empDetectionOutputModel from "./schema/empDetectionOutput.model.js";
|
|
|
47
47
|
import auditUsersModel from "./schema/auditUsers.model.js";
|
|
48
48
|
import clusterModel from "./schema/cluster.model.js";
|
|
49
49
|
import teamsModel from "./schema/teams.model.js";
|
|
50
|
+
import checklistassignconfig from "./schema/checklistassignconfig.js";
|
|
51
|
+
import checklistconfig from "./schema/checklistconfig.js";
|
|
52
|
+
import checklistlog from "./schema/checklistlog.js";
|
|
53
|
+
import checklistquestionconfig from "./schema/checklistquestionconfig.js";
|
|
54
|
+
import processedchecklist from "./schema/processedchecklist.js";
|
|
55
|
+
import processedchecklistconfig from "./schema/processedchecklistconfig.js";
|
|
56
|
+
import processeddetection from "./schema/processeddetection.js";
|
|
57
|
+
import domain from "./schema/domain.js";
|
|
50
58
|
|
|
51
59
|
|
|
52
60
|
|
|
@@ -100,5 +108,13 @@ export default {
|
|
|
100
108
|
empDetectionOutputModel,
|
|
101
109
|
auditUsersModel,
|
|
102
110
|
clusterModel,
|
|
103
|
-
teamsModel
|
|
111
|
+
teamsModel,
|
|
112
|
+
checklistassignconfig,
|
|
113
|
+
checklistconfig,
|
|
114
|
+
checklistlog,
|
|
115
|
+
checklistquestionconfig,
|
|
116
|
+
processedchecklist,
|
|
117
|
+
processedchecklistconfig,
|
|
118
|
+
processeddetection,
|
|
119
|
+
domain,
|
|
104
120
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const checklistassignconfigSchema = new mongoose.Schema({
|
|
4
|
+
store_id: {
|
|
5
|
+
type: String,
|
|
6
|
+
required:true,
|
|
7
|
+
default:''
|
|
8
|
+
},
|
|
9
|
+
storeName: {
|
|
10
|
+
type: String,
|
|
11
|
+
required:true,
|
|
12
|
+
default:''
|
|
13
|
+
},
|
|
14
|
+
userId: {
|
|
15
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
16
|
+
},
|
|
17
|
+
userEmail: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
userName: {
|
|
21
|
+
type: String,
|
|
22
|
+
},
|
|
23
|
+
userPhone:{
|
|
24
|
+
type:String,
|
|
25
|
+
},
|
|
26
|
+
city:{
|
|
27
|
+
type:String
|
|
28
|
+
},
|
|
29
|
+
country:{
|
|
30
|
+
type:String
|
|
31
|
+
},
|
|
32
|
+
checkFlag: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default:true
|
|
35
|
+
},
|
|
36
|
+
checkListId: {
|
|
37
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
38
|
+
required:true
|
|
39
|
+
},
|
|
40
|
+
checkListName: {
|
|
41
|
+
type: String,
|
|
42
|
+
required:true
|
|
43
|
+
},
|
|
44
|
+
client_id: {
|
|
45
|
+
type: String,
|
|
46
|
+
required:true
|
|
47
|
+
},
|
|
48
|
+
brandId: {
|
|
49
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
50
|
+
required:true
|
|
51
|
+
},
|
|
52
|
+
createdAt: {
|
|
53
|
+
type: Date,
|
|
54
|
+
default: Date.now
|
|
55
|
+
},
|
|
56
|
+
updatedAt: {
|
|
57
|
+
type: Date,
|
|
58
|
+
default: Date.now
|
|
59
|
+
},
|
|
60
|
+
isdeleted: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
strict: true,
|
|
67
|
+
versionKey: false,
|
|
68
|
+
timestamps: true,
|
|
69
|
+
},
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
export default mongoose.model( 'checklistassignconfig', checklistassignconfigSchema);
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const checklistconfigSchema = new mongoose.Schema({
|
|
4
|
+
type: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true,
|
|
7
|
+
enum:['checklist','section']
|
|
8
|
+
},
|
|
9
|
+
checkListNumber: {
|
|
10
|
+
type: Number,
|
|
11
|
+
},
|
|
12
|
+
checkListName: {
|
|
13
|
+
type: String,
|
|
14
|
+
},
|
|
15
|
+
checkListDescription:{
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
// sectionNumber: {
|
|
19
|
+
// type: Number
|
|
20
|
+
// },
|
|
21
|
+
// sectionName: {
|
|
22
|
+
// type: String
|
|
23
|
+
// },
|
|
24
|
+
createdBy: {
|
|
25
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
createdByName: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
publish: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
schedule: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'onetime',
|
|
39
|
+
enum: ["daily", "weekly", "monthly","range", "onetime",'weekday']
|
|
40
|
+
},
|
|
41
|
+
scheduleRepeatedDay: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default:[]
|
|
44
|
+
},
|
|
45
|
+
scheduleStartTime: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ''
|
|
48
|
+
},
|
|
49
|
+
scheduleStartTimeISO: {
|
|
50
|
+
type: Date
|
|
51
|
+
},
|
|
52
|
+
scheduleEndTime: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ''
|
|
55
|
+
},
|
|
56
|
+
scheduleEndTimeISO: {
|
|
57
|
+
type: Date
|
|
58
|
+
},
|
|
59
|
+
scheduleDate: {
|
|
60
|
+
type: Date,
|
|
61
|
+
default: Date.now
|
|
62
|
+
},
|
|
63
|
+
configStartDate:{
|
|
64
|
+
type:Date,
|
|
65
|
+
default:''
|
|
66
|
+
},
|
|
67
|
+
configEndDate:{
|
|
68
|
+
type:Date,
|
|
69
|
+
default:''
|
|
70
|
+
},
|
|
71
|
+
specificDate:{
|
|
72
|
+
type:Array,
|
|
73
|
+
default:[]
|
|
74
|
+
},
|
|
75
|
+
scheduleWeekDays:{
|
|
76
|
+
type:Array,
|
|
77
|
+
default:[]
|
|
78
|
+
},
|
|
79
|
+
scheduleRepeatedMonthSetup: {
|
|
80
|
+
type: String,
|
|
81
|
+
enum: ["day", "date","specific",""],
|
|
82
|
+
default:'date'
|
|
83
|
+
},
|
|
84
|
+
scheduleRepeatedMonthDate: {
|
|
85
|
+
type: String,
|
|
86
|
+
default:''
|
|
87
|
+
},
|
|
88
|
+
allowedOverTime: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default:false
|
|
91
|
+
},
|
|
92
|
+
allowedStoreLocation: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default:false
|
|
95
|
+
},
|
|
96
|
+
detectionArea: {
|
|
97
|
+
type: Array
|
|
98
|
+
},
|
|
99
|
+
alert: {
|
|
100
|
+
usageExceeds: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default:''
|
|
103
|
+
},
|
|
104
|
+
alertsTo: {
|
|
105
|
+
type: Array
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
client_id: {
|
|
109
|
+
type: String
|
|
110
|
+
},
|
|
111
|
+
brandId: {
|
|
112
|
+
type: mongoose.SchemaTypes.ObjectId
|
|
113
|
+
},
|
|
114
|
+
questionCount: {
|
|
115
|
+
type: Number,
|
|
116
|
+
default:0
|
|
117
|
+
},
|
|
118
|
+
storeCount: {
|
|
119
|
+
type: Number,
|
|
120
|
+
default: 0
|
|
121
|
+
},
|
|
122
|
+
publishDate: {
|
|
123
|
+
type: Date,
|
|
124
|
+
},
|
|
125
|
+
locationCount:{
|
|
126
|
+
type:Number
|
|
127
|
+
},
|
|
128
|
+
checkListId:{
|
|
129
|
+
type:mongoose.SchemaTypes.ObjectId
|
|
130
|
+
},
|
|
131
|
+
checkListType:{
|
|
132
|
+
type:String,
|
|
133
|
+
default:"custom",
|
|
134
|
+
enum: ["storeopenandclose","mobileusagedetection","uniformdetection","custom"]
|
|
135
|
+
},
|
|
136
|
+
createdAt: {
|
|
137
|
+
type: Date,
|
|
138
|
+
default: Date.now
|
|
139
|
+
},
|
|
140
|
+
updatedAt: {
|
|
141
|
+
type: Date,
|
|
142
|
+
default: Date.now
|
|
143
|
+
},
|
|
144
|
+
isdeleted: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: false
|
|
147
|
+
},
|
|
148
|
+
markasread:{
|
|
149
|
+
type:Boolean,
|
|
150
|
+
default:false
|
|
151
|
+
},
|
|
152
|
+
allowedMultiSubmit: {
|
|
153
|
+
type: Boolean,
|
|
154
|
+
default:false
|
|
155
|
+
},
|
|
156
|
+
allowOnce:{
|
|
157
|
+
type:Boolean,
|
|
158
|
+
default:false
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
strict: true,
|
|
163
|
+
versionKey: false,
|
|
164
|
+
timestamps: true,
|
|
165
|
+
},
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
export default mongoose.model( 'checklistconfig', checklistconfigSchema);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const checklistlogSchema = new mongoose.Schema({
|
|
4
|
+
checklistId: {
|
|
5
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
6
|
+
required:true
|
|
7
|
+
},
|
|
8
|
+
checkListName: {
|
|
9
|
+
type: String
|
|
10
|
+
},
|
|
11
|
+
sectionId: {
|
|
12
|
+
type: mongoose.SchemaTypes.ObjectId
|
|
13
|
+
},
|
|
14
|
+
sectionName: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
questionName: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
action: {
|
|
21
|
+
type: String,
|
|
22
|
+
required:true
|
|
23
|
+
},
|
|
24
|
+
store_id: {
|
|
25
|
+
type: String
|
|
26
|
+
},
|
|
27
|
+
storeName: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
client_id: {
|
|
31
|
+
type: String,
|
|
32
|
+
required:true
|
|
33
|
+
},
|
|
34
|
+
brandId: {
|
|
35
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
36
|
+
required:true
|
|
37
|
+
},
|
|
38
|
+
createdAt: {
|
|
39
|
+
type: Date,
|
|
40
|
+
default: Date.now
|
|
41
|
+
},
|
|
42
|
+
updatedAt: {
|
|
43
|
+
type: Date,
|
|
44
|
+
default: Date.now
|
|
45
|
+
},
|
|
46
|
+
date_iso: {
|
|
47
|
+
type: Date,
|
|
48
|
+
},
|
|
49
|
+
processedChecklistId: {
|
|
50
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
strict: true,
|
|
55
|
+
versionKey: false,
|
|
56
|
+
timestamps: true,
|
|
57
|
+
},
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
export default mongoose.model( 'checklistlog', checklistlogSchema);
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const checklistquestionconfigSchema = new mongoose.Schema({
|
|
4
|
+
// question: [
|
|
5
|
+
// {
|
|
6
|
+
// qno: {
|
|
7
|
+
// type: Number,
|
|
8
|
+
// default: 0
|
|
9
|
+
// },
|
|
10
|
+
// qname: {
|
|
11
|
+
// type: String,
|
|
12
|
+
// default: "",
|
|
13
|
+
// },
|
|
14
|
+
// answerType: {
|
|
15
|
+
// type: String,
|
|
16
|
+
// enum: ["descriptive","yes/no","multiplechoicesingle","multiplechoicemultiple","image","video","descriptiveImage","multipleImage"],
|
|
17
|
+
// default: "descriptive",
|
|
18
|
+
// },
|
|
19
|
+
// runAI: {
|
|
20
|
+
// type: Boolean,
|
|
21
|
+
// default: false,
|
|
22
|
+
// },
|
|
23
|
+
// runAIDescription: {
|
|
24
|
+
// type: String,
|
|
25
|
+
// default: "",
|
|
26
|
+
// },
|
|
27
|
+
// allowUploadfromGallery: {
|
|
28
|
+
// type: Boolean,
|
|
29
|
+
// default: false,
|
|
30
|
+
// },
|
|
31
|
+
// remarks: {
|
|
32
|
+
// type: String,
|
|
33
|
+
// default: "",
|
|
34
|
+
// },
|
|
35
|
+
// answers: [
|
|
36
|
+
// {
|
|
37
|
+
// answer: {
|
|
38
|
+
// type: String,
|
|
39
|
+
// default: "",
|
|
40
|
+
// },
|
|
41
|
+
// answeroptionNumber: {
|
|
42
|
+
// type: Number,
|
|
43
|
+
// default: 0,
|
|
44
|
+
// },
|
|
45
|
+
// sopFlag: {
|
|
46
|
+
// type: Boolean,
|
|
47
|
+
// default: false,
|
|
48
|
+
// },
|
|
49
|
+
// validation: {
|
|
50
|
+
// type: Boolean,
|
|
51
|
+
// default: false,
|
|
52
|
+
// },
|
|
53
|
+
// validationType: {
|
|
54
|
+
// type: String,
|
|
55
|
+
// enum: ["Descriptive Answer","Capture Image","Capture Video",""],
|
|
56
|
+
// default: "",
|
|
57
|
+
// },
|
|
58
|
+
// validationAnswer: {
|
|
59
|
+
// type: String,
|
|
60
|
+
// default: "",
|
|
61
|
+
// },
|
|
62
|
+
// validationDescriptiveAnswerType: {
|
|
63
|
+
// type: String,
|
|
64
|
+
// enum: ["text","number"],
|
|
65
|
+
// default: "text",
|
|
66
|
+
// },
|
|
67
|
+
// referenceImage: {
|
|
68
|
+
// type: String,
|
|
69
|
+
// default: "",
|
|
70
|
+
// },
|
|
71
|
+
// allowUploadfromGallery: {
|
|
72
|
+
// type: Boolean,
|
|
73
|
+
// default: false,
|
|
74
|
+
// },
|
|
75
|
+
// showLinked: {
|
|
76
|
+
// type: Boolean,
|
|
77
|
+
// default: false,
|
|
78
|
+
// },
|
|
79
|
+
// showLinked: {
|
|
80
|
+
// type: Number,
|
|
81
|
+
// default: 0,
|
|
82
|
+
// },
|
|
83
|
+
// nestedQuestion: {
|
|
84
|
+
// type: Array,
|
|
85
|
+
// default: [],
|
|
86
|
+
// },
|
|
87
|
+
// }
|
|
88
|
+
// ],
|
|
89
|
+
// linkType: {
|
|
90
|
+
// type: Boolean,
|
|
91
|
+
// default: false,
|
|
92
|
+
// },
|
|
93
|
+
// questionReferenceImage: {
|
|
94
|
+
// type: String,
|
|
95
|
+
// default: "",
|
|
96
|
+
// },
|
|
97
|
+
// descriptivetype: {
|
|
98
|
+
// type: String,
|
|
99
|
+
// enum: ["text","number"],
|
|
100
|
+
// default: "text",
|
|
101
|
+
// },
|
|
102
|
+
// }
|
|
103
|
+
// ],
|
|
104
|
+
question: {
|
|
105
|
+
type: Array,
|
|
106
|
+
required:true
|
|
107
|
+
},
|
|
108
|
+
section: {
|
|
109
|
+
type: String,
|
|
110
|
+
required:true
|
|
111
|
+
},
|
|
112
|
+
checkList: {
|
|
113
|
+
type: String,
|
|
114
|
+
required: true
|
|
115
|
+
},
|
|
116
|
+
checkListId: {
|
|
117
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
118
|
+
required: true
|
|
119
|
+
},
|
|
120
|
+
client_id: {
|
|
121
|
+
type: String,
|
|
122
|
+
required: true
|
|
123
|
+
},
|
|
124
|
+
brandId: {
|
|
125
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
126
|
+
required: true
|
|
127
|
+
},
|
|
128
|
+
createdAt: {
|
|
129
|
+
type: Date,
|
|
130
|
+
default: Date.now
|
|
131
|
+
},
|
|
132
|
+
updatedAt: {
|
|
133
|
+
type: Date,
|
|
134
|
+
default: Date.now
|
|
135
|
+
},
|
|
136
|
+
isdeleted: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: false
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
strict: true,
|
|
143
|
+
versionKey: false,
|
|
144
|
+
timestamps: true,
|
|
145
|
+
},
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
export default mongoose.model( 'checklistquestionconfig', checklistquestionconfigSchema);
|
package/schema/domain.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const domainSchema = new mongoose.Schema({
|
|
4
|
+
domain:{
|
|
5
|
+
type:String,
|
|
6
|
+
required:true
|
|
7
|
+
},
|
|
8
|
+
client_id: {
|
|
9
|
+
type: String
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
strict: true,
|
|
14
|
+
versionKey: false,
|
|
15
|
+
timestamps: true,
|
|
16
|
+
},
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default mongoose.model( 'domain', domainSchema);
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const processedchecklistSchema = new mongoose.Schema({
|
|
4
|
+
client_id: {
|
|
5
|
+
type: String,
|
|
6
|
+
required:true
|
|
7
|
+
},
|
|
8
|
+
brandId: {
|
|
9
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
10
|
+
required:true
|
|
11
|
+
},
|
|
12
|
+
date_iso: {
|
|
13
|
+
type: Date,
|
|
14
|
+
},
|
|
15
|
+
date_string: {
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
sourceCheckList_id: {
|
|
19
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
20
|
+
ref: 'checklistconfig'
|
|
21
|
+
},
|
|
22
|
+
checkListName: {
|
|
23
|
+
type: String,
|
|
24
|
+
required:true
|
|
25
|
+
},
|
|
26
|
+
scheduleStartTime: {
|
|
27
|
+
type: String
|
|
28
|
+
},
|
|
29
|
+
scheduleEndTime: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
scheduleStartTime_iso: {
|
|
33
|
+
type: Date
|
|
34
|
+
},
|
|
35
|
+
scheduleEndTime_iso: {
|
|
36
|
+
type: Date
|
|
37
|
+
},
|
|
38
|
+
allowedOverTime: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default:false
|
|
41
|
+
},
|
|
42
|
+
allowedStoreLocation: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default:false
|
|
45
|
+
},
|
|
46
|
+
createdBy: {
|
|
47
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
48
|
+
},
|
|
49
|
+
createdByName: {
|
|
50
|
+
type: String,
|
|
51
|
+
},
|
|
52
|
+
questionAnswers: {
|
|
53
|
+
type: Array
|
|
54
|
+
},
|
|
55
|
+
createdAt: {
|
|
56
|
+
type: Date,
|
|
57
|
+
default: Date.now
|
|
58
|
+
},
|
|
59
|
+
updatedAt: {
|
|
60
|
+
type: Date,
|
|
61
|
+
default: Date.now
|
|
62
|
+
},
|
|
63
|
+
isdeleted: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
questionCount: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 0
|
|
70
|
+
},
|
|
71
|
+
storeCount: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 0
|
|
74
|
+
},
|
|
75
|
+
publishDate: {
|
|
76
|
+
type: Date,
|
|
77
|
+
},
|
|
78
|
+
locationCount: {
|
|
79
|
+
type: Number
|
|
80
|
+
},
|
|
81
|
+
checkListType: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: "custom",
|
|
84
|
+
enum: ["storeopenandclose", "mobileusagedetection", "uniformdetection", "custom"]
|
|
85
|
+
},
|
|
86
|
+
store_id: {
|
|
87
|
+
type: String,
|
|
88
|
+
required:true,
|
|
89
|
+
default:''
|
|
90
|
+
},
|
|
91
|
+
country: {
|
|
92
|
+
type: String,
|
|
93
|
+
required:false,
|
|
94
|
+
default:''
|
|
95
|
+
},
|
|
96
|
+
storeName: {
|
|
97
|
+
type: String,
|
|
98
|
+
required:true,
|
|
99
|
+
default:''
|
|
100
|
+
},
|
|
101
|
+
userId: {
|
|
102
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
103
|
+
// required:true
|
|
104
|
+
},
|
|
105
|
+
userName: {
|
|
106
|
+
type: String,
|
|
107
|
+
// required:true
|
|
108
|
+
},
|
|
109
|
+
userEmail: {
|
|
110
|
+
type: String,
|
|
111
|
+
// required:true
|
|
112
|
+
},
|
|
113
|
+
checkListId: {
|
|
114
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
115
|
+
required:true
|
|
116
|
+
},
|
|
117
|
+
checklistStatus: {
|
|
118
|
+
type: String,
|
|
119
|
+
enum: ['open', 'inprogress', 'submit'],
|
|
120
|
+
default: 'open'
|
|
121
|
+
},
|
|
122
|
+
startTime:{
|
|
123
|
+
type: Date,
|
|
124
|
+
},
|
|
125
|
+
submitTime:{
|
|
126
|
+
type: Date,
|
|
127
|
+
},
|
|
128
|
+
startTime_string:{
|
|
129
|
+
type: String,
|
|
130
|
+
},
|
|
131
|
+
submitTime_string:{
|
|
132
|
+
type: String,
|
|
133
|
+
},
|
|
134
|
+
timeFlagStatus:{
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: true
|
|
137
|
+
},
|
|
138
|
+
timeFlag:{
|
|
139
|
+
type: Number,
|
|
140
|
+
default: 0
|
|
141
|
+
},
|
|
142
|
+
questionFlag:{
|
|
143
|
+
type: Number,
|
|
144
|
+
default: 0
|
|
145
|
+
},
|
|
146
|
+
mobileDetectionFlag:{
|
|
147
|
+
type: Number,
|
|
148
|
+
default: 0
|
|
149
|
+
},
|
|
150
|
+
storeOpenCloseFlag:{
|
|
151
|
+
type: Number,
|
|
152
|
+
default: 0
|
|
153
|
+
},
|
|
154
|
+
reinitiateStatus:{
|
|
155
|
+
type:Boolean,
|
|
156
|
+
default: false
|
|
157
|
+
},
|
|
158
|
+
markasread:{
|
|
159
|
+
type:Boolean,
|
|
160
|
+
default:false
|
|
161
|
+
},
|
|
162
|
+
uniformDetectionFlag:{
|
|
163
|
+
type: Number,
|
|
164
|
+
default: 0
|
|
165
|
+
},
|
|
166
|
+
scheduleRepeatedType: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: '',
|
|
169
|
+
enum: ["daily", "weekly", "monthly","range",""]
|
|
170
|
+
},
|
|
171
|
+
startMobileTime:{
|
|
172
|
+
type:String
|
|
173
|
+
},
|
|
174
|
+
submitMobileTime:{
|
|
175
|
+
type:String
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
strict: true,
|
|
180
|
+
versionKey: false,
|
|
181
|
+
timestamps: true,
|
|
182
|
+
},
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
export default mongoose.model( 'processedchecklist', processedchecklistSchema);
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const processedchecklistconfigSchema = new mongoose.Schema({
|
|
4
|
+
client_id: {
|
|
5
|
+
type: String,
|
|
6
|
+
required:true
|
|
7
|
+
},
|
|
8
|
+
brandId: {
|
|
9
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
10
|
+
required:true
|
|
11
|
+
},
|
|
12
|
+
date_iso: {
|
|
13
|
+
type: Date,
|
|
14
|
+
},
|
|
15
|
+
date_string: {
|
|
16
|
+
type: String,
|
|
17
|
+
},
|
|
18
|
+
sourceCheckList_id: {
|
|
19
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
20
|
+
ref: 'checklistconfig'
|
|
21
|
+
},
|
|
22
|
+
checkListName: {
|
|
23
|
+
type: String,
|
|
24
|
+
required:true
|
|
25
|
+
},
|
|
26
|
+
scheduleStartTime: {
|
|
27
|
+
type: String
|
|
28
|
+
},
|
|
29
|
+
scheduleEndTime: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
scheduleStartTime_iso: {
|
|
33
|
+
type: Date
|
|
34
|
+
},
|
|
35
|
+
scheduleEndTime_iso: {
|
|
36
|
+
type: Date
|
|
37
|
+
},
|
|
38
|
+
allowedOverTime: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default:false
|
|
41
|
+
},
|
|
42
|
+
allowedStoreLocation: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default:false
|
|
45
|
+
},
|
|
46
|
+
createdBy: {
|
|
47
|
+
type: mongoose.SchemaTypes.ObjectId,
|
|
48
|
+
},
|
|
49
|
+
createdByName: {
|
|
50
|
+
type: String,
|
|
51
|
+
},
|
|
52
|
+
questionAnswers: {
|
|
53
|
+
type: Array
|
|
54
|
+
},
|
|
55
|
+
createdAt: {
|
|
56
|
+
type: Date,
|
|
57
|
+
default: Date.now
|
|
58
|
+
},
|
|
59
|
+
updatedAt: {
|
|
60
|
+
type: Date,
|
|
61
|
+
default: Date.now
|
|
62
|
+
},
|
|
63
|
+
isdeleted: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
questionCount: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 0
|
|
70
|
+
},
|
|
71
|
+
storeCount: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 0
|
|
74
|
+
},
|
|
75
|
+
publishDate: {
|
|
76
|
+
type: Date,
|
|
77
|
+
},
|
|
78
|
+
locationCount: {
|
|
79
|
+
type: Number
|
|
80
|
+
},
|
|
81
|
+
checkListType: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: "custom",
|
|
84
|
+
enum: ["storeopenandclose", "mobileusagedetection", "uniformdetection", "custom"]
|
|
85
|
+
},
|
|
86
|
+
startTime:{
|
|
87
|
+
type:Date
|
|
88
|
+
},
|
|
89
|
+
scheduleRepeatedType: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: '',
|
|
92
|
+
enum: ["daily", "weekly", "monthly","range",""]
|
|
93
|
+
},
|
|
94
|
+
allowedMultiSubmit: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default:false
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
strict: true,
|
|
101
|
+
versionKey: false,
|
|
102
|
+
timestamps: true,
|
|
103
|
+
},
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
export default mongoose.model( 'processedchecklistconfig', processedchecklistconfigSchema);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
const processeddetectionSchema = new mongoose.Schema({
|
|
4
|
+
client_id:{
|
|
5
|
+
type:String,
|
|
6
|
+
required:true
|
|
7
|
+
},
|
|
8
|
+
store_id:{
|
|
9
|
+
type:String,
|
|
10
|
+
required:true
|
|
11
|
+
},
|
|
12
|
+
userName:{
|
|
13
|
+
type:String,
|
|
14
|
+
required:true,
|
|
15
|
+
default:'System Created'
|
|
16
|
+
},
|
|
17
|
+
userId:{
|
|
18
|
+
type:mongoose.SchemaTypes.ObjectId,
|
|
19
|
+
},
|
|
20
|
+
time:{
|
|
21
|
+
type:String,
|
|
22
|
+
required:true
|
|
23
|
+
},
|
|
24
|
+
type:{
|
|
25
|
+
type:String,
|
|
26
|
+
required:true,
|
|
27
|
+
default:'negative'
|
|
28
|
+
},
|
|
29
|
+
checklistName:{
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
checklistId:{
|
|
34
|
+
type:mongoose.SchemaTypes.ObjectId,
|
|
35
|
+
required:true
|
|
36
|
+
},
|
|
37
|
+
sourceChecklist_id:{
|
|
38
|
+
type:mongoose.SchemaTypes.ObjectId,
|
|
39
|
+
required:true
|
|
40
|
+
},
|
|
41
|
+
category:{
|
|
42
|
+
type:String
|
|
43
|
+
},
|
|
44
|
+
reason:{
|
|
45
|
+
type:String,
|
|
46
|
+
default:''
|
|
47
|
+
},
|
|
48
|
+
acknowledgedDate:{
|
|
49
|
+
type:Date,
|
|
50
|
+
default:''
|
|
51
|
+
},
|
|
52
|
+
date_iso:{
|
|
53
|
+
type:Date
|
|
54
|
+
},
|
|
55
|
+
date_string:{
|
|
56
|
+
type:String
|
|
57
|
+
},
|
|
58
|
+
startRange:{
|
|
59
|
+
type:String
|
|
60
|
+
},
|
|
61
|
+
scheduleTime:{
|
|
62
|
+
type:Date
|
|
63
|
+
},
|
|
64
|
+
timeStamp:{
|
|
65
|
+
type:Number
|
|
66
|
+
},
|
|
67
|
+
timeFormat:{
|
|
68
|
+
type:String
|
|
69
|
+
},
|
|
70
|
+
createdAt: {
|
|
71
|
+
type: Date,
|
|
72
|
+
default: Date.now()
|
|
73
|
+
},
|
|
74
|
+
updatedAt: {
|
|
75
|
+
type: Date,
|
|
76
|
+
default: Date.now()
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
strict: true,
|
|
81
|
+
versionKey: false,
|
|
82
|
+
timestamps: true,
|
|
83
|
+
},
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
export default mongoose.model( 'processeddetection', processeddetectionSchema);
|