tango-api-schema 1.0.64 → 2.0.0
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 +2 -78
- package/package.json +1 -1
- package/schema/lead.model.js +76 -0
- package/schema/activitylog.model.js +0 -42
- package/schema/applicationDefault.model.js +0 -24
- package/schema/brand.model.js +0 -439
- package/schema/camera.model.js +0 -105
- package/schema/client.model.js +0 -248
- package/schema/dailyAuditFiles.model.js +0 -44
- package/schema/dailyAuditStoreFiles.model.js +0 -54
- package/schema/dailyWorkLog.model.js +0 -141
- package/schema/dlProcessedDaily.model.js +0 -507
- package/schema/dlZone.model.js +0 -135
- package/schema/edgeappVersion.model.js +0 -23
- package/schema/eyeTest.model.js +0 -47
- package/schema/eyeTestData.model.js +0 -45
- package/schema/finance.model.js +0 -101
- package/schema/liveDetectionData.model.js +0 -39
- package/schema/liveProcessedData.model.js +0 -360
- package/schema/noSourceNormalizedDaily.model.js +0 -569
- package/schema/noSourceNormalizedHourly.model.js +0 -185
- package/schema/nob.model.js +0 -39
- package/schema/nobClient.model.js +0 -26
- package/schema/nobHourly.model.js +0 -43
- package/schema/normalizedProcessHour.model.js +0 -186
- package/schema/normalizedProcessedDaily.model.js +0 -560
- package/schema/processedCheckList.model.js +0 -164
- package/schema/processedDaily.model.js +0 -569
- package/schema/processedDetection.model.js +0 -77
- package/schema/processedHourly.model.js +0 -186
- package/schema/reportParameter.model.js +0 -13
- package/schema/revop.model.js +0 -93
- package/schema/source.model.js +0 -9
- package/schema/sourceNormalizedDaily.model.js +0 -565
- package/schema/sourceNormalizedHourly.model.js +0 -193
- package/schema/storeOperation.model.js +0 -66
- package/schema/stores.model.js +0 -577
- package/schema/ticket.model.js +0 -114
- package/schema/token.model.js +0 -32
- package/schema/user.model.js +0 -95
- package/schema/userRole.model.js +0 -28
- package/schema/zone.model.js +0 -209
package/schema/stores.model.js
DELETED
|
@@ -1,577 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name api_stores_models_store
|
|
3
|
-
* @description Store Schema
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// NPM Modules
|
|
7
|
-
import mongoose from 'mongoose';
|
|
8
|
-
|
|
9
|
-
// Schema
|
|
10
|
-
const collection = new mongoose.Schema(
|
|
11
|
-
{
|
|
12
|
-
admin: {
|
|
13
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
14
|
-
ref: 'User',
|
|
15
|
-
},
|
|
16
|
-
client_id: {
|
|
17
|
-
type: String,
|
|
18
|
-
trim: true,
|
|
19
|
-
},
|
|
20
|
-
id: {
|
|
21
|
-
type: String,
|
|
22
|
-
trim: true,
|
|
23
|
-
required: true,
|
|
24
|
-
unique: true,
|
|
25
|
-
},
|
|
26
|
-
reference_code: {
|
|
27
|
-
type: String,
|
|
28
|
-
trim: true,
|
|
29
|
-
},
|
|
30
|
-
name: {
|
|
31
|
-
type: String,
|
|
32
|
-
trim: true,
|
|
33
|
-
required: true,
|
|
34
|
-
},
|
|
35
|
-
location: {
|
|
36
|
-
type: String,
|
|
37
|
-
trim: true,
|
|
38
|
-
},
|
|
39
|
-
country: {
|
|
40
|
-
type: String,
|
|
41
|
-
trim: true,
|
|
42
|
-
},
|
|
43
|
-
state: {
|
|
44
|
-
type: String,
|
|
45
|
-
trim: true,
|
|
46
|
-
},
|
|
47
|
-
city: {
|
|
48
|
-
type: String,
|
|
49
|
-
trim: true,
|
|
50
|
-
},
|
|
51
|
-
pincode: {
|
|
52
|
-
type: String,
|
|
53
|
-
trim: true,
|
|
54
|
-
},
|
|
55
|
-
timezone: {
|
|
56
|
-
type: String,
|
|
57
|
-
required: false,
|
|
58
|
-
default: 'Asia/Kolkata',
|
|
59
|
-
},
|
|
60
|
-
country_code: {
|
|
61
|
-
type: String,
|
|
62
|
-
trim: true,
|
|
63
|
-
required: true,
|
|
64
|
-
default: 'IN',
|
|
65
|
-
},
|
|
66
|
-
latitude: {
|
|
67
|
-
type: Number,
|
|
68
|
-
trim: true,
|
|
69
|
-
required: false,
|
|
70
|
-
default: 0.0,
|
|
71
|
-
},
|
|
72
|
-
longitude: {
|
|
73
|
-
type: Number,
|
|
74
|
-
trim: true,
|
|
75
|
-
required: false,
|
|
76
|
-
default: 0.0,
|
|
77
|
-
},
|
|
78
|
-
spoc: {
|
|
79
|
-
name: {
|
|
80
|
-
type: String,
|
|
81
|
-
trim: true,
|
|
82
|
-
required: true,
|
|
83
|
-
},
|
|
84
|
-
email: {
|
|
85
|
-
type: String,
|
|
86
|
-
trim: true,
|
|
87
|
-
required: true,
|
|
88
|
-
},
|
|
89
|
-
contact: {
|
|
90
|
-
type: String,
|
|
91
|
-
trim: true,
|
|
92
|
-
required: true,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
appId: {
|
|
96
|
-
type: String,
|
|
97
|
-
trim: true,
|
|
98
|
-
required: true,
|
|
99
|
-
unique: true,
|
|
100
|
-
},
|
|
101
|
-
appVersion: {
|
|
102
|
-
type: String,
|
|
103
|
-
trim: true,
|
|
104
|
-
},
|
|
105
|
-
architecture: {
|
|
106
|
-
type: String,
|
|
107
|
-
trim: true,
|
|
108
|
-
enum: [ 'x32', 'x64' ],
|
|
109
|
-
},
|
|
110
|
-
paired: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: false,
|
|
113
|
-
},
|
|
114
|
-
configured: {
|
|
115
|
-
type: Boolean,
|
|
116
|
-
default: false,
|
|
117
|
-
},
|
|
118
|
-
storeType: {
|
|
119
|
-
type: String,
|
|
120
|
-
trim: true,
|
|
121
|
-
},
|
|
122
|
-
hibernet: {
|
|
123
|
-
enabled: {
|
|
124
|
-
type: Boolean,
|
|
125
|
-
},
|
|
126
|
-
startTime: {
|
|
127
|
-
type: String,
|
|
128
|
-
trim: true,
|
|
129
|
-
},
|
|
130
|
-
endTime: {
|
|
131
|
-
type: String,
|
|
132
|
-
trim: true,
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
camera: [
|
|
136
|
-
{
|
|
137
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
138
|
-
ref: 'Camera',
|
|
139
|
-
},
|
|
140
|
-
],
|
|
141
|
-
brandId: {
|
|
142
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
143
|
-
ref: 'Brand',
|
|
144
|
-
},
|
|
145
|
-
client_id: {
|
|
146
|
-
type: String,
|
|
147
|
-
},
|
|
148
|
-
triggerProcessId: {
|
|
149
|
-
type: String,
|
|
150
|
-
},
|
|
151
|
-
isRestartRequired: {
|
|
152
|
-
type: Boolean,
|
|
153
|
-
default: false,
|
|
154
|
-
},
|
|
155
|
-
edgeAppToken: {
|
|
156
|
-
type: String,
|
|
157
|
-
},
|
|
158
|
-
active: {
|
|
159
|
-
type: Boolean,
|
|
160
|
-
default: true,
|
|
161
|
-
},
|
|
162
|
-
deployed_date: {
|
|
163
|
-
type: Date,
|
|
164
|
-
default: Date.now,
|
|
165
|
-
},
|
|
166
|
-
deployedBy: {
|
|
167
|
-
type: String,
|
|
168
|
-
},
|
|
169
|
-
deployedStatus: {
|
|
170
|
-
type: Boolean,
|
|
171
|
-
default: false,
|
|
172
|
-
},
|
|
173
|
-
client_reference_id: {
|
|
174
|
-
type: String,
|
|
175
|
-
},
|
|
176
|
-
client_crm_name: {
|
|
177
|
-
type: String,
|
|
178
|
-
},
|
|
179
|
-
client_sap_code: {
|
|
180
|
-
type: String,
|
|
181
|
-
},
|
|
182
|
-
updateAppVersion: {
|
|
183
|
-
type: String,
|
|
184
|
-
trim: true,
|
|
185
|
-
},
|
|
186
|
-
ticketpaused: {
|
|
187
|
-
type: Date,
|
|
188
|
-
default: Date.now,
|
|
189
|
-
},
|
|
190
|
-
lastticket_generated: {
|
|
191
|
-
type: Date,
|
|
192
|
-
},
|
|
193
|
-
serverType: {
|
|
194
|
-
type: Boolean,
|
|
195
|
-
default: false,
|
|
196
|
-
},
|
|
197
|
-
isdeletedstore: {
|
|
198
|
-
type: Boolean,
|
|
199
|
-
default: false,
|
|
200
|
-
},
|
|
201
|
-
camera_count: {
|
|
202
|
-
type: Number,
|
|
203
|
-
default: 0,
|
|
204
|
-
},
|
|
205
|
-
deleteInterval: {
|
|
206
|
-
type: Number,
|
|
207
|
-
default: 0,
|
|
208
|
-
},
|
|
209
|
-
timeElapsed: {
|
|
210
|
-
type: Number,
|
|
211
|
-
trim: true,
|
|
212
|
-
default: 13,
|
|
213
|
-
},
|
|
214
|
-
subscribed_features: {},
|
|
215
|
-
boundarybox_config: {
|
|
216
|
-
time_series: {
|
|
217
|
-
type: Array,
|
|
218
|
-
default: [],
|
|
219
|
-
},
|
|
220
|
-
time_interval: {
|
|
221
|
-
type: Number,
|
|
222
|
-
default: 1,
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
weekday_yolofilter: {
|
|
226
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
227
|
-
ref: 'yolo_filters',
|
|
228
|
-
},
|
|
229
|
-
weekend_yolofilter: {
|
|
230
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
231
|
-
ref: 'yolo_filters',
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
////////////////
|
|
235
|
-
id: {
|
|
236
|
-
type: String,
|
|
237
|
-
trim: true,
|
|
238
|
-
required: true,
|
|
239
|
-
unique: true,
|
|
240
|
-
},
|
|
241
|
-
name: {
|
|
242
|
-
type: String,
|
|
243
|
-
trim: true,
|
|
244
|
-
required: true,
|
|
245
|
-
},
|
|
246
|
-
storeProfile: {
|
|
247
|
-
reference_code: {
|
|
248
|
-
type: String,
|
|
249
|
-
trim: true,
|
|
250
|
-
},
|
|
251
|
-
location: {
|
|
252
|
-
type: String,
|
|
253
|
-
trim: true,
|
|
254
|
-
required: true,
|
|
255
|
-
},
|
|
256
|
-
country: {
|
|
257
|
-
type: String,
|
|
258
|
-
trim: true,
|
|
259
|
-
required: true,
|
|
260
|
-
},
|
|
261
|
-
state: {
|
|
262
|
-
type: String,
|
|
263
|
-
trim: true,
|
|
264
|
-
},
|
|
265
|
-
city: {
|
|
266
|
-
type: String,
|
|
267
|
-
trim: true,
|
|
268
|
-
},
|
|
269
|
-
pincode: {
|
|
270
|
-
type: String,
|
|
271
|
-
trim: true,
|
|
272
|
-
},
|
|
273
|
-
timezone: {
|
|
274
|
-
type: String,
|
|
275
|
-
default: 'Asia/Kolkata',
|
|
276
|
-
},
|
|
277
|
-
country_code: {
|
|
278
|
-
type: String,
|
|
279
|
-
trim: true,
|
|
280
|
-
required: true,
|
|
281
|
-
default: 'IN',
|
|
282
|
-
},
|
|
283
|
-
latitude: {
|
|
284
|
-
type: Number,
|
|
285
|
-
trim: true,
|
|
286
|
-
required: false,
|
|
287
|
-
default: 0.0,
|
|
288
|
-
},
|
|
289
|
-
longitude: {
|
|
290
|
-
type: Number,
|
|
291
|
-
trim: true,
|
|
292
|
-
required: false,
|
|
293
|
-
default: 0.0,
|
|
294
|
-
},
|
|
295
|
-
},
|
|
296
|
-
spocDetails: [
|
|
297
|
-
{
|
|
298
|
-
name: {
|
|
299
|
-
type: String,
|
|
300
|
-
required: true,
|
|
301
|
-
},
|
|
302
|
-
email: {
|
|
303
|
-
type: String,
|
|
304
|
-
required: true,
|
|
305
|
-
},
|
|
306
|
-
contact: {
|
|
307
|
-
type: String,
|
|
308
|
-
required: true,
|
|
309
|
-
},
|
|
310
|
-
designation: {
|
|
311
|
-
type: String,
|
|
312
|
-
required: true,
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
],
|
|
316
|
-
appId: {
|
|
317
|
-
type: String,
|
|
318
|
-
trim: true,
|
|
319
|
-
required: true,
|
|
320
|
-
unique: true,
|
|
321
|
-
},
|
|
322
|
-
storeType: {
|
|
323
|
-
type: String,
|
|
324
|
-
trim: true,
|
|
325
|
-
required: true,
|
|
326
|
-
},
|
|
327
|
-
businessType: {
|
|
328
|
-
type: String,
|
|
329
|
-
trim: true,
|
|
330
|
-
},
|
|
331
|
-
brandId: {
|
|
332
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
333
|
-
ref: 'Brand',
|
|
334
|
-
},
|
|
335
|
-
client_id: {
|
|
336
|
-
type: String,
|
|
337
|
-
},
|
|
338
|
-
active: {
|
|
339
|
-
type: Boolean,
|
|
340
|
-
default: true,
|
|
341
|
-
},
|
|
342
|
-
dataProcess: {
|
|
343
|
-
type: String,
|
|
344
|
-
enum: [ 'hold', 'suspend', 'active', 'deActive' ],
|
|
345
|
-
default: 'active',
|
|
346
|
-
},
|
|
347
|
-
ticketConfigs: {
|
|
348
|
-
hibernation: {
|
|
349
|
-
type: Date,
|
|
350
|
-
default: Date.now,
|
|
351
|
-
},
|
|
352
|
-
lastticket_generated: {
|
|
353
|
-
type: Date,
|
|
354
|
-
},
|
|
355
|
-
nextLiveTicketTime: {
|
|
356
|
-
type: Date,
|
|
357
|
-
},
|
|
358
|
-
},
|
|
359
|
-
configuration: {
|
|
360
|
-
storeOpenTime: {
|
|
361
|
-
type: String,
|
|
362
|
-
required: true,
|
|
363
|
-
},
|
|
364
|
-
storeCloseTime: {
|
|
365
|
-
type: String,
|
|
366
|
-
required: true,
|
|
367
|
-
},
|
|
368
|
-
storeOpenTimeIST: {
|
|
369
|
-
type: String,
|
|
370
|
-
required: true,
|
|
371
|
-
},
|
|
372
|
-
storeCloseTimeIST: {
|
|
373
|
-
type: String,
|
|
374
|
-
required: true,
|
|
375
|
-
},
|
|
376
|
-
},
|
|
377
|
-
storeConnectionId: {
|
|
378
|
-
anydeskId: {
|
|
379
|
-
type: String,
|
|
380
|
-
},
|
|
381
|
-
teamViewer: {
|
|
382
|
-
type: String,
|
|
383
|
-
},
|
|
384
|
-
},
|
|
385
|
-
edge: {
|
|
386
|
-
timeZone: {
|
|
387
|
-
type: String,
|
|
388
|
-
required: false,
|
|
389
|
-
},
|
|
390
|
-
firstFileDate: {
|
|
391
|
-
type: Date,
|
|
392
|
-
},
|
|
393
|
-
firstFile: {
|
|
394
|
-
type: Boolean,
|
|
395
|
-
},
|
|
396
|
-
status: {
|
|
397
|
-
type: Boolean,
|
|
398
|
-
},
|
|
399
|
-
timeDownload: {
|
|
400
|
-
type: Date,
|
|
401
|
-
},
|
|
402
|
-
hibernet: {
|
|
403
|
-
type: Object,
|
|
404
|
-
},
|
|
405
|
-
appVersion: {
|
|
406
|
-
type: String,
|
|
407
|
-
trim: true,
|
|
408
|
-
},
|
|
409
|
-
architecture: {
|
|
410
|
-
type: String,
|
|
411
|
-
trim: true,
|
|
412
|
-
enum: [ 'x32', 'x64' ],
|
|
413
|
-
},
|
|
414
|
-
updateAppVersion: {
|
|
415
|
-
type: String,
|
|
416
|
-
trim: true,
|
|
417
|
-
},
|
|
418
|
-
triggerProcessId: {
|
|
419
|
-
type: String,
|
|
420
|
-
},
|
|
421
|
-
isRestartRequired: {
|
|
422
|
-
type: Boolean,
|
|
423
|
-
},
|
|
424
|
-
serverType: {
|
|
425
|
-
type: Boolean,
|
|
426
|
-
},
|
|
427
|
-
deleteInterval: {
|
|
428
|
-
type: Number,
|
|
429
|
-
},
|
|
430
|
-
timeElapsed: {
|
|
431
|
-
type: Number,
|
|
432
|
-
trim: true,
|
|
433
|
-
},
|
|
434
|
-
lastLoginAt: {
|
|
435
|
-
type: Date,
|
|
436
|
-
},
|
|
437
|
-
macId: {
|
|
438
|
-
type: String,
|
|
439
|
-
trim: true,
|
|
440
|
-
},
|
|
441
|
-
handShake: {
|
|
442
|
-
type: Boolean,
|
|
443
|
-
},
|
|
444
|
-
speedTest: {
|
|
445
|
-
type: Object,
|
|
446
|
-
},
|
|
447
|
-
dataUpload: {
|
|
448
|
-
type: Object,
|
|
449
|
-
},
|
|
450
|
-
preRequisiteStartedAt: {
|
|
451
|
-
type: Date,
|
|
452
|
-
},
|
|
453
|
-
preRequisite: {
|
|
454
|
-
type: Boolean,
|
|
455
|
-
},
|
|
456
|
-
deviceSpec: {
|
|
457
|
-
type: Object,
|
|
458
|
-
},
|
|
459
|
-
systemUtil: {
|
|
460
|
-
type: Object,
|
|
461
|
-
},
|
|
462
|
-
camCred: {
|
|
463
|
-
type: Object,
|
|
464
|
-
},
|
|
465
|
-
deleteExe: {
|
|
466
|
-
type: Boolean,
|
|
467
|
-
},
|
|
468
|
-
camDetails: {
|
|
469
|
-
type: Object,
|
|
470
|
-
},
|
|
471
|
-
secertKey: {
|
|
472
|
-
type: String,
|
|
473
|
-
trim: true,
|
|
474
|
-
},
|
|
475
|
-
ipListStatus: {
|
|
476
|
-
type: Boolean,
|
|
477
|
-
},
|
|
478
|
-
ipManufacturerStatus: {
|
|
479
|
-
type: Boolean,
|
|
480
|
-
},
|
|
481
|
-
installEdge: {
|
|
482
|
-
type: Boolean,
|
|
483
|
-
},
|
|
484
|
-
systemTimeZone: {
|
|
485
|
-
type: String,
|
|
486
|
-
},
|
|
487
|
-
configurationStage: {
|
|
488
|
-
type: String,
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
|
-
pendingInit: {
|
|
492
|
-
// next level of initialization
|
|
493
|
-
type: String,
|
|
494
|
-
},
|
|
495
|
-
pipelineTrigger: {
|
|
496
|
-
pipelineType: {
|
|
497
|
-
type: String,
|
|
498
|
-
default: 'v1_live',
|
|
499
|
-
},
|
|
500
|
-
processLiveFeature: {
|
|
501
|
-
type: Boolean,
|
|
502
|
-
default: false,
|
|
503
|
-
},
|
|
504
|
-
processEodFeature: {
|
|
505
|
-
type: Boolean,
|
|
506
|
-
default: true,
|
|
507
|
-
},
|
|
508
|
-
processReid: {
|
|
509
|
-
type: Boolean,
|
|
510
|
-
default: true,
|
|
511
|
-
},
|
|
512
|
-
processYolo: {
|
|
513
|
-
type: Boolean,
|
|
514
|
-
default: true,
|
|
515
|
-
},
|
|
516
|
-
reidQueue: {
|
|
517
|
-
type: String,
|
|
518
|
-
default: 'eod-reid',
|
|
519
|
-
},
|
|
520
|
-
yoloQueue: {
|
|
521
|
-
type: String,
|
|
522
|
-
default: 'YOLO_LIVE',
|
|
523
|
-
},
|
|
524
|
-
version: {
|
|
525
|
-
type: String,
|
|
526
|
-
default: 'v1',
|
|
527
|
-
},
|
|
528
|
-
filterType: {
|
|
529
|
-
type: String,
|
|
530
|
-
default: 'default',
|
|
531
|
-
},
|
|
532
|
-
},
|
|
533
|
-
featurePackage: {
|
|
534
|
-
controlCenter: {
|
|
535
|
-
type: Boolean,
|
|
536
|
-
default: false,
|
|
537
|
-
},
|
|
538
|
-
revops: {
|
|
539
|
-
type: Boolean,
|
|
540
|
-
default: false,
|
|
541
|
-
},
|
|
542
|
-
zone: {
|
|
543
|
-
type: Boolean,
|
|
544
|
-
default: false,
|
|
545
|
-
},
|
|
546
|
-
recap: {
|
|
547
|
-
type: Boolean,
|
|
548
|
-
default: false,
|
|
549
|
-
},
|
|
550
|
-
eyeTest: {
|
|
551
|
-
type: Boolean,
|
|
552
|
-
default: false,
|
|
553
|
-
},
|
|
554
|
-
},
|
|
555
|
-
auditConfigs: {
|
|
556
|
-
count: {
|
|
557
|
-
type: Number,
|
|
558
|
-
default: 200,
|
|
559
|
-
},
|
|
560
|
-
iterateCount: {
|
|
561
|
-
type: Number,
|
|
562
|
-
default: 5,
|
|
563
|
-
},
|
|
564
|
-
ratio: {
|
|
565
|
-
type: mongoose.Schema.Types.Number,
|
|
566
|
-
default: 0.75,
|
|
567
|
-
},
|
|
568
|
-
},
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
timestamps: true,
|
|
572
|
-
versionKey: false,
|
|
573
|
-
strict: true,
|
|
574
|
-
},
|
|
575
|
-
);
|
|
576
|
-
|
|
577
|
-
export default mongoose.model( 'Store', collection );
|
package/schema/ticket.model.js
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name api_tickets_models
|
|
3
|
-
* @description Tickets Schema
|
|
4
|
-
*/
|
|
5
|
-
import { Schema, model } from 'mongoose';
|
|
6
|
-
import uniqueValidator from 'mongoose-unique-validator';
|
|
7
|
-
|
|
8
|
-
// Schema
|
|
9
|
-
const collection = new Schema( {
|
|
10
|
-
TicketId: {
|
|
11
|
-
type: String,
|
|
12
|
-
trim: true,
|
|
13
|
-
required: true,
|
|
14
|
-
unique: true,
|
|
15
|
-
},
|
|
16
|
-
IssueType: {
|
|
17
|
-
type: String,
|
|
18
|
-
enum: [ 'Infra', 'Installation', 'Live' ],
|
|
19
|
-
trim: true,
|
|
20
|
-
},
|
|
21
|
-
Date: {
|
|
22
|
-
type: Date,
|
|
23
|
-
},
|
|
24
|
-
brandId: {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
brand: {
|
|
28
|
-
type: Schema.Types.ObjectId,
|
|
29
|
-
ref: 'Brand',
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
storeId: {
|
|
33
|
-
type: String,
|
|
34
|
-
},
|
|
35
|
-
store: {
|
|
36
|
-
type: Schema.Types.ObjectId,
|
|
37
|
-
ref: 'store',
|
|
38
|
-
required: true,
|
|
39
|
-
},
|
|
40
|
-
storeName: {
|
|
41
|
-
type: String,
|
|
42
|
-
},
|
|
43
|
-
createdby: {
|
|
44
|
-
type: Schema.Types.ObjectId,
|
|
45
|
-
ref: 'User',
|
|
46
|
-
},
|
|
47
|
-
downtime: {
|
|
48
|
-
type: Number,
|
|
49
|
-
trim: true,
|
|
50
|
-
},
|
|
51
|
-
config_down_time: {
|
|
52
|
-
type: Number,
|
|
53
|
-
trim: true,
|
|
54
|
-
},
|
|
55
|
-
status: {
|
|
56
|
-
type: String,
|
|
57
|
-
enum: [ 'NotIdentified', 'PendingFromClient', 'PendingFromTango', 'Addressed', 'Installed', 'Onboarded', 'Paired' ],
|
|
58
|
-
default: 'NotIdentified',
|
|
59
|
-
},
|
|
60
|
-
Reason: [
|
|
61
|
-
{
|
|
62
|
-
comment: {
|
|
63
|
-
type: String,
|
|
64
|
-
},
|
|
65
|
-
AddressedBy: {
|
|
66
|
-
type: Schema.Types.ObjectId,
|
|
67
|
-
ref: 'users',
|
|
68
|
-
},
|
|
69
|
-
attachments: {
|
|
70
|
-
type: String,
|
|
71
|
-
},
|
|
72
|
-
callBackDays: {
|
|
73
|
-
type: Number,
|
|
74
|
-
},
|
|
75
|
-
updatedAt: {
|
|
76
|
-
type: Date,
|
|
77
|
-
default: Date.now(),
|
|
78
|
-
},
|
|
79
|
-
status: {
|
|
80
|
-
type: String,
|
|
81
|
-
enum: [ 'PendingFromClient', 'PendingFromTango' ],
|
|
82
|
-
},
|
|
83
|
-
issue: [
|
|
84
|
-
{
|
|
85
|
-
parent: {
|
|
86
|
-
type: Schema.Types.ObjectId,
|
|
87
|
-
ref: 'categories',
|
|
88
|
-
},
|
|
89
|
-
primary: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: false,
|
|
92
|
-
},
|
|
93
|
-
subIssue: {
|
|
94
|
-
type: Schema.Types.ObjectId,
|
|
95
|
-
ref: 'categories',
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
assigned: {
|
|
102
|
-
type: Schema.Types.ObjectId,
|
|
103
|
-
ref: 'User',
|
|
104
|
-
},
|
|
105
|
-
}, {
|
|
106
|
-
strict: true,
|
|
107
|
-
versionKey: false,
|
|
108
|
-
timestamps: true,
|
|
109
|
-
} );
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
collection.plugin( uniqueValidator );
|
|
113
|
-
|
|
114
|
-
export default model( 'TangoTicket', collection );
|
package/schema/token.model.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// NPM Modules
|
|
2
|
-
import mongoose from 'mongoose';
|
|
3
|
-
const tokenSchema = mongoose.Schema( {
|
|
4
|
-
token: {
|
|
5
|
-
type: String,
|
|
6
|
-
trim: true,
|
|
7
|
-
unique: true,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
type: {
|
|
11
|
-
type: String,
|
|
12
|
-
enum: [ 'access-token', 'verify-user', 'forgot-pwd', 'reset-pwd', 'email-otp', 'phone-otp', 'edgeapp-access-token', 'cron' ],
|
|
13
|
-
default: 'access-token',
|
|
14
|
-
},
|
|
15
|
-
subType: {
|
|
16
|
-
type: String,
|
|
17
|
-
},
|
|
18
|
-
createdAt: {
|
|
19
|
-
type: Date,
|
|
20
|
-
default: Date.now,
|
|
21
|
-
},
|
|
22
|
-
user: {
|
|
23
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
24
|
-
ref: 'User',
|
|
25
|
-
},
|
|
26
|
-
}, {
|
|
27
|
-
strict: true,
|
|
28
|
-
versionKey: false,
|
|
29
|
-
timestamps: true,
|
|
30
|
-
} );
|
|
31
|
-
|
|
32
|
-
export default mongoose.model( 'adminToken', tokenSchema, 'adminToken' );
|