tango-api-schema 2.1.60 → 2.1.61
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/package.json +1 -1
- package/schema/download.js +90 -72
package/package.json
CHANGED
package/schema/download.js
CHANGED
|
@@ -1,79 +1,97 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
2
|
|
|
3
3
|
const downloadSchema = new mongoose.Schema({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
client_id: {
|
|
5
|
+
type: String,
|
|
6
|
+
required:true
|
|
7
|
+
},
|
|
8
|
+
date_iso: {
|
|
9
|
+
type: Date,
|
|
10
|
+
},
|
|
11
|
+
date_string: {
|
|
12
|
+
type: String,
|
|
13
|
+
},
|
|
14
|
+
sourceCheckList_id: {
|
|
15
|
+
type: String,
|
|
16
|
+
},
|
|
17
|
+
storeIds: {
|
|
18
|
+
type: Array,
|
|
19
|
+
},
|
|
20
|
+
questions: {
|
|
21
|
+
type: Array,
|
|
22
|
+
},
|
|
23
|
+
status: {
|
|
24
|
+
type: String,
|
|
25
|
+
enum: ['open','inprogress','completed'],
|
|
26
|
+
default: 'open'
|
|
27
|
+
},
|
|
28
|
+
name: {
|
|
29
|
+
type: String,
|
|
30
|
+
},
|
|
31
|
+
url: {
|
|
32
|
+
type: String,
|
|
33
|
+
},
|
|
34
|
+
clientNotification: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
trim: false
|
|
37
|
+
},
|
|
38
|
+
adminNotification: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
trim: true
|
|
41
|
+
},
|
|
42
|
+
createdBy: {
|
|
43
|
+
type: mongoose.Types.ObjectId,
|
|
44
|
+
ref: 'User'
|
|
45
|
+
},
|
|
46
|
+
userEmail: {
|
|
47
|
+
type:String,
|
|
48
|
+
},
|
|
49
|
+
fileType:{
|
|
50
|
+
type:String,
|
|
51
|
+
required:true,
|
|
52
|
+
enum: ['pdf','csv','ppt','pdfzip','zipfiles'],
|
|
53
|
+
default:'zipfiles'
|
|
54
|
+
},
|
|
55
|
+
createdAt: {
|
|
56
|
+
type: Date,
|
|
57
|
+
default: Date.now
|
|
58
|
+
},
|
|
59
|
+
updatedAt: {
|
|
60
|
+
type: Date,
|
|
61
|
+
default: Date.now
|
|
62
|
+
},
|
|
63
|
+
markasread: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
checklistIdList:{
|
|
68
|
+
type:Array
|
|
69
|
+
},
|
|
70
|
+
filePath:{
|
|
71
|
+
type:Array
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
previewType:{
|
|
75
|
+
type:String,
|
|
76
|
+
enum: ['','image','video'],
|
|
77
|
+
default:''
|
|
78
|
+
},
|
|
79
|
+
viewFlag:{
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
83
|
+
fromDate: {
|
|
84
|
+
type: String,
|
|
85
|
+
},
|
|
86
|
+
toDate: {
|
|
87
|
+
type: String,
|
|
88
|
+
},
|
|
89
|
+
downloadInsertFrom: {
|
|
90
|
+
type: String,
|
|
91
|
+
enum: ['','report','gallery','dashboard'],
|
|
92
|
+
default:''
|
|
93
|
+
},
|
|
7
94
|
},
|
|
8
|
-
date_iso: {
|
|
9
|
-
type: Date,
|
|
10
|
-
},
|
|
11
|
-
date_string: {
|
|
12
|
-
type: String,
|
|
13
|
-
},
|
|
14
|
-
sourceCheckList_id: {
|
|
15
|
-
type: String,
|
|
16
|
-
},
|
|
17
|
-
storeIds: {
|
|
18
|
-
type: Array,
|
|
19
|
-
},
|
|
20
|
-
questions: {
|
|
21
|
-
type: Array,
|
|
22
|
-
},
|
|
23
|
-
status: {
|
|
24
|
-
type: String,
|
|
25
|
-
enum: ['open','inprogress','completed'],
|
|
26
|
-
default: 'open'
|
|
27
|
-
},
|
|
28
|
-
name: {
|
|
29
|
-
type: String,
|
|
30
|
-
},
|
|
31
|
-
url: {
|
|
32
|
-
type: String,
|
|
33
|
-
},
|
|
34
|
-
clientNotification: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
trim: false
|
|
37
|
-
},
|
|
38
|
-
adminNotification: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
trim: true
|
|
41
|
-
},
|
|
42
|
-
createdBy: {
|
|
43
|
-
type: mongoose.Types.ObjectId,
|
|
44
|
-
ref: 'User'
|
|
45
|
-
},
|
|
46
|
-
userEmail: {
|
|
47
|
-
type:String,
|
|
48
|
-
},
|
|
49
|
-
fileType:{
|
|
50
|
-
type:String,
|
|
51
|
-
required:true,
|
|
52
|
-
enum: ['pdf','csv','ppt','pdfzip','zipfiles'],
|
|
53
|
-
default:'zipfiles'
|
|
54
|
-
},
|
|
55
|
-
createdAt: {
|
|
56
|
-
type: Date,
|
|
57
|
-
default: Date.now
|
|
58
|
-
},
|
|
59
|
-
updatedAt: {
|
|
60
|
-
type: Date,
|
|
61
|
-
default: Date.now
|
|
62
|
-
},
|
|
63
|
-
markasread: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: false
|
|
66
|
-
},
|
|
67
|
-
checklistIdList:{
|
|
68
|
-
type:Array
|
|
69
|
-
},
|
|
70
|
-
filePath:{
|
|
71
|
-
type:Array
|
|
72
|
-
},
|
|
73
|
-
previewType:{
|
|
74
|
-
type:String
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
95
|
{
|
|
78
96
|
strict: true,
|
|
79
97
|
versionKey: false,
|