tango-api-schema 2.2.6 → 2.2.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -178,6 +178,10 @@ const checklistconfigSchema = new mongoose.Schema({
178
178
  type:Array,
179
179
  default:[]
180
180
  },
181
+ restrictAttendance:{
182
+ type:Boolean,
183
+ default:false
184
+ },
181
185
  },
182
186
  {
183
187
  strict: true,
@@ -196,6 +196,10 @@ const processedchecklistSchema = new mongoose.Schema({
196
196
  },
197
197
  checkListDescription:{
198
198
  type: String,
199
+ },
200
+ restrictAttendance:{
201
+ type:Boolean,
202
+ default:false
199
203
  },
200
204
  },
201
205
  {
@@ -105,6 +105,10 @@ const processedchecklistconfigSchema = new mongoose.Schema({
105
105
  remainder:{
106
106
  type:Array,
107
107
  default:[]
108
+ },
109
+ restrictAttendance:{
110
+ type:Boolean,
111
+ default:false
108
112
  },
109
113
  },
110
114
  {
@@ -1,72 +1,72 @@
1
- import mongoose from 'mongoose';
2
-
3
- const taskassignconfigSchema = 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
- createdAt: {
49
- type: Date,
50
- default: Date.now
51
- },
52
- updatedAt: {
53
- type: Date,
54
- default: Date.now
55
- },
56
- isdeleted: {
57
- type: Boolean,
58
- default: false
59
- },
60
- reinitiate:{
61
- type:Boolean,
62
- default:false
63
- }
64
- },
65
- {
66
- strict: true,
67
- versionKey: false,
68
- timestamps: true,
69
- },
70
- );
71
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const taskassignconfigSchema = 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
+ createdAt: {
49
+ type: Date,
50
+ default: Date.now
51
+ },
52
+ updatedAt: {
53
+ type: Date,
54
+ default: Date.now
55
+ },
56
+ isdeleted: {
57
+ type: Boolean,
58
+ default: false
59
+ },
60
+ reinitiate:{
61
+ type:Boolean,
62
+ default:false
63
+ }
64
+ },
65
+ {
66
+ strict: true,
67
+ versionKey: false,
68
+ timestamps: true,
69
+ },
70
+ );
71
+
72
72
  export default mongoose.model( 'taskAssignConfig', taskassignconfigSchema);
@@ -1,107 +1,107 @@
1
- import mongoose from 'mongoose';
2
-
3
- const taskSchema = new mongoose.Schema(
4
- {
5
- checkListName: {
6
- type: String,
7
- },
8
- checkListDescription:{
9
- type: String,
10
- },
11
- createdBy: {
12
- type: mongoose.SchemaTypes.ObjectId,
13
- required: true
14
- },
15
- createdByName: {
16
- type: String,
17
- required: true
18
- },
19
- publish: {
20
- type: Boolean,
21
- default: false
22
- },
23
- scheduleEndTime: {
24
- type: String,
25
- default: ''
26
- },
27
- scheduleEndTimeISO: {
28
- type: Date
29
- },
30
- scheduleDate: {
31
- type: Date,
32
- default: Date.now
33
- },
34
- client_id: {
35
- type: String
36
- },
37
- questionCount: {
38
- type: Number,
39
- default:0
40
- },
41
- storeCount: {
42
- type: Number,
43
- default: 0
44
- },
45
- publishDate: {
46
- type: Date,
47
- },
48
- locationCount:{
49
- type:Number
50
- },
51
- checkListType:{
52
- type:String,
53
- default:"task",
54
- enum: ['task','checklistTask','cctv']
55
- },
56
- createdAt: {
57
- type: Date,
58
- default: Date.now
59
- },
60
- updatedAt: {
61
- type: Date,
62
- default: Date.now
63
- },
64
- isdeleted: {
65
- type: Boolean,
66
- default: false
67
- },
68
- markasread:{
69
- type:Boolean,
70
- default:false
71
- },
72
- priorityType:{
73
- type:String,
74
- enum:['high','medium','low'],
75
- },
76
- approver:{
77
- type:Array,
78
- default:[]
79
- },
80
- remainder:{
81
- type:Array,
82
- default:[]
83
- },
84
- restrictAttendance:{
85
- type:Boolean,
86
- default:false
87
- },
88
- allowedStoreLocation: {
89
- type: Boolean,
90
- default:false
91
- },
92
- reinitiate:{
93
- type:Boolean,
94
- default:false
95
- },
96
- referenceCheckListId:{
97
- type:mongoose.SchemaTypes.ObjectId,
98
- }
99
- },
100
- {
101
- strict: true,
102
- versionKey: false,
103
- timestamps: true,
104
- },
105
- );
106
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const taskSchema = new mongoose.Schema(
4
+ {
5
+ checkListName: {
6
+ type: String,
7
+ },
8
+ checkListDescription:{
9
+ type: String,
10
+ },
11
+ createdBy: {
12
+ type: mongoose.SchemaTypes.ObjectId,
13
+ required: true
14
+ },
15
+ createdByName: {
16
+ type: String,
17
+ required: true
18
+ },
19
+ publish: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ scheduleEndTime: {
24
+ type: String,
25
+ default: ''
26
+ },
27
+ scheduleEndTimeISO: {
28
+ type: Date
29
+ },
30
+ scheduleDate: {
31
+ type: Date,
32
+ default: Date.now
33
+ },
34
+ client_id: {
35
+ type: String
36
+ },
37
+ questionCount: {
38
+ type: Number,
39
+ default:0
40
+ },
41
+ storeCount: {
42
+ type: Number,
43
+ default: 0
44
+ },
45
+ publishDate: {
46
+ type: Date,
47
+ },
48
+ locationCount:{
49
+ type:Number
50
+ },
51
+ checkListType:{
52
+ type:String,
53
+ default:"task",
54
+ enum: ['task','checklistTask','cctv']
55
+ },
56
+ createdAt: {
57
+ type: Date,
58
+ default: Date.now
59
+ },
60
+ updatedAt: {
61
+ type: Date,
62
+ default: Date.now
63
+ },
64
+ isdeleted: {
65
+ type: Boolean,
66
+ default: false
67
+ },
68
+ markasread:{
69
+ type:Boolean,
70
+ default:false
71
+ },
72
+ priorityType:{
73
+ type:String,
74
+ enum:['high','medium','low'],
75
+ },
76
+ approver:{
77
+ type:Array,
78
+ default:[]
79
+ },
80
+ remainder:{
81
+ type:Array,
82
+ default:[]
83
+ },
84
+ restrictAttendance:{
85
+ type:Boolean,
86
+ default:false
87
+ },
88
+ allowedStoreLocation: {
89
+ type: Boolean,
90
+ default:false
91
+ },
92
+ reinitiate:{
93
+ type:Boolean,
94
+ default:false
95
+ },
96
+ referenceCheckListId:{
97
+ type:mongoose.SchemaTypes.ObjectId,
98
+ }
99
+ },
100
+ {
101
+ strict: true,
102
+ versionKey: false,
103
+ timestamps: true,
104
+ },
105
+ );
106
+
107
107
  export default mongoose.model( 'taskConfig', taskSchema);
@@ -1,199 +1,203 @@
1
- import mongoose from 'mongoose';
2
-
3
- const processedTaskSchema = new mongoose.Schema(
4
- {
5
- client_id: {
6
- type: String,
7
- required:true
8
- },
9
- date_iso: {
10
- type: Date,
11
- },
12
- date_string: {
13
- type: String,
14
- },
15
- sourceCheckList_id: {
16
- type: mongoose.SchemaTypes.ObjectId,
17
- ref: 'taskConfig'
18
- },
19
- checkListName: {
20
- type: String,
21
- required:true
22
- },
23
- scheduleStartTime: {
24
- type: String
25
- },
26
- scheduleEndTime: {
27
- type: String
28
- },
29
- scheduleStartTime_iso: {
30
- type: Date
31
- },
32
- scheduleEndTime_iso: {
33
- type: Date
34
- },
35
- allowedOverTime: {
36
- type: Boolean,
37
- default:false
38
- },
39
- allowedStoreLocation: {
40
- type: Boolean,
41
- default:false
42
- },
43
- createdBy: {
44
- type: mongoose.SchemaTypes.ObjectId,
45
- },
46
- createdByName: {
47
- type: String,
48
- },
49
- questionAnswers: {
50
- type: Array
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
- questionCount: {
65
- type: Number,
66
- default: 0
67
- },
68
- storeCount: {
69
- type: Number,
70
- default: 0
71
- },
72
- publishDate: {
73
- type: Date,
74
- },
75
- locationCount: {
76
- type: Number
77
- },
78
- checkListType: {
79
- type: String,
80
- default: "task",
81
- enum: ["task","checklistTask",'cctv']
82
- },
83
- store_id: {
84
- type: String,
85
- default:''
86
- },
87
- country: {
88
- type: String,
89
- required:false,
90
- default:''
91
- },
92
- storeName: {
93
- type: String,
94
- default:''
95
- },
96
- userId: {
97
- type: mongoose.SchemaTypes.ObjectId,
98
- },
99
- userName: {
100
- type: String,
101
- },
102
- userEmail: {
103
- type: String,
104
- },
105
- checkListId: {
106
- type: mongoose.SchemaTypes.ObjectId,
107
- required:true
108
- },
109
- checklistStatus: {
110
- type: String,
111
- enum: ['open', 'inprogress', 'submit'],
112
- default: 'open'
113
- },
114
- startTime:{
115
- type: Date,
116
- },
117
- submitTime:{
118
- type: Date,
119
- },
120
- startTime_string:{
121
- type: String,
122
- },
123
- submitTime_string:{
124
- type: String,
125
- },
126
- timeFlagStatus:{
127
- type: Boolean,
128
- default: true
129
- },
130
- timeFlag:{
131
- type: Number,
132
- default: 0
133
- },
134
- questionFlag:{
135
- type: Number,
136
- default: 0
137
- },
138
- mobileDetectionFlag:{
139
- type: Number,
140
- default: 0
141
- },
142
- storeOpenCloseFlag:{
143
- type: Number,
144
- default: 0
145
- },
146
- reinitiateStatus:{
147
- type:Boolean,
148
- default: false
149
- },
150
- markasread:{
151
- type:Boolean,
152
- default:false
153
- },
154
- uniformDetectionFlag:{
155
- type: Number,
156
- default: 0
157
- },
158
- scheduleRepeatedType: {
159
- type: String,
160
- default: '',
161
- enum: ["daily"]
162
- },
163
- startMobileTime:{
164
- type:String
165
- },
166
- submitMobileTime:{
167
- type:String
168
- },
169
- approvalStatus:{
170
- type:Boolean,
171
- default:false
172
- },
173
- approvalEnable:{
174
- type:Boolean,
175
- default:false
176
- },
177
- redoStatus:{
178
- type:Boolean,
179
- default:false
180
- },
181
- priorityType:{
182
- type:String
183
- },
184
- checkListDescription:{
185
- type: String,
186
- },
187
- remainder:{
188
- type:Array,
189
- default:[]
190
- },
191
- },
192
- {
193
- strict: true,
194
- versionKey: false,
195
- timestamps: true,
196
- },
197
- );
198
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const processedTaskSchema = new mongoose.Schema(
4
+ {
5
+ client_id: {
6
+ type: String,
7
+ required:true
8
+ },
9
+ date_iso: {
10
+ type: Date,
11
+ },
12
+ date_string: {
13
+ type: String,
14
+ },
15
+ sourceCheckList_id: {
16
+ type: mongoose.SchemaTypes.ObjectId,
17
+ ref: 'taskConfig'
18
+ },
19
+ checkListName: {
20
+ type: String,
21
+ required:true
22
+ },
23
+ scheduleStartTime: {
24
+ type: String
25
+ },
26
+ scheduleEndTime: {
27
+ type: String
28
+ },
29
+ scheduleStartTime_iso: {
30
+ type: Date
31
+ },
32
+ scheduleEndTime_iso: {
33
+ type: Date
34
+ },
35
+ allowedOverTime: {
36
+ type: Boolean,
37
+ default:false
38
+ },
39
+ allowedStoreLocation: {
40
+ type: Boolean,
41
+ default:false
42
+ },
43
+ createdBy: {
44
+ type: mongoose.SchemaTypes.ObjectId,
45
+ },
46
+ createdByName: {
47
+ type: String,
48
+ },
49
+ questionAnswers: {
50
+ type: Array
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
+ questionCount: {
65
+ type: Number,
66
+ default: 0
67
+ },
68
+ storeCount: {
69
+ type: Number,
70
+ default: 0
71
+ },
72
+ publishDate: {
73
+ type: Date,
74
+ },
75
+ locationCount: {
76
+ type: Number
77
+ },
78
+ checkListType: {
79
+ type: String,
80
+ default: "task",
81
+ enum: ["task","checklistTask",'cctv']
82
+ },
83
+ store_id: {
84
+ type: String,
85
+ default:''
86
+ },
87
+ country: {
88
+ type: String,
89
+ required:false,
90
+ default:''
91
+ },
92
+ storeName: {
93
+ type: String,
94
+ default:''
95
+ },
96
+ userId: {
97
+ type: mongoose.SchemaTypes.ObjectId,
98
+ },
99
+ userName: {
100
+ type: String,
101
+ },
102
+ userEmail: {
103
+ type: String,
104
+ },
105
+ checkListId: {
106
+ type: mongoose.SchemaTypes.ObjectId,
107
+ required:true
108
+ },
109
+ checklistStatus: {
110
+ type: String,
111
+ enum: ['open', 'inprogress', 'submit'],
112
+ default: 'open'
113
+ },
114
+ startTime:{
115
+ type: Date,
116
+ },
117
+ submitTime:{
118
+ type: Date,
119
+ },
120
+ startTime_string:{
121
+ type: String,
122
+ },
123
+ submitTime_string:{
124
+ type: String,
125
+ },
126
+ timeFlagStatus:{
127
+ type: Boolean,
128
+ default: true
129
+ },
130
+ timeFlag:{
131
+ type: Number,
132
+ default: 0
133
+ },
134
+ questionFlag:{
135
+ type: Number,
136
+ default: 0
137
+ },
138
+ mobileDetectionFlag:{
139
+ type: Number,
140
+ default: 0
141
+ },
142
+ storeOpenCloseFlag:{
143
+ type: Number,
144
+ default: 0
145
+ },
146
+ reinitiateStatus:{
147
+ type:Boolean,
148
+ default: false
149
+ },
150
+ markasread:{
151
+ type:Boolean,
152
+ default:false
153
+ },
154
+ uniformDetectionFlag:{
155
+ type: Number,
156
+ default: 0
157
+ },
158
+ scheduleRepeatedType: {
159
+ type: String,
160
+ default: '',
161
+ enum: ["daily"]
162
+ },
163
+ startMobileTime:{
164
+ type:String
165
+ },
166
+ submitMobileTime:{
167
+ type:String
168
+ },
169
+ approvalStatus:{
170
+ type:Boolean,
171
+ default:false
172
+ },
173
+ approvalEnable:{
174
+ type:Boolean,
175
+ default:false
176
+ },
177
+ redoStatus:{
178
+ type:Boolean,
179
+ default:false
180
+ },
181
+ priorityType:{
182
+ type:String
183
+ },
184
+ checkListDescription:{
185
+ type: String,
186
+ },
187
+ remainder:{
188
+ type:Array,
189
+ default:[]
190
+ },
191
+ restrictAttendance:{
192
+ type:Boolean,
193
+ default:false
194
+ },
195
+ },
196
+ {
197
+ strict: true,
198
+ versionKey: false,
199
+ timestamps: true,
200
+ },
201
+ );
202
+
199
203
  export default mongoose.model( 'processedTask', processedTaskSchema);
@@ -1,116 +1,120 @@
1
- import mongoose from 'mongoose';
2
-
3
- const processestaskconfigSchema = new mongoose.Schema({
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: mongoose.Schema.Types.ObjectId,
16
- ref: 'taskConfig'
17
- },
18
- checkListName: {
19
- type: String,
20
- required:true
21
- },
22
- scheduleStartTime: {
23
- type: String
24
- },
25
- scheduleEndTime: {
26
- type: String
27
- },
28
- scheduleStartTime_iso: {
29
- type: Date
30
- },
31
- scheduleEndTime_iso: {
32
- type: Date
33
- },
34
- allowedOverTime: {
35
- type: Boolean,
36
- default:false
37
- },
38
- allowedStoreLocation: {
39
- type: Boolean,
40
- default:false
41
- },
42
- createdBy: {
43
- type: mongoose.SchemaTypes.ObjectId,
44
- },
45
- createdByName: {
46
- type: String,
47
- },
48
- questionAnswers: {
49
- type: Array
50
- },
51
- createdAt: {
52
- type: Date,
53
- default: Date.now
54
- },
55
- updatedAt: {
56
- type: Date,
57
- default: Date.now
58
- },
59
- isdeleted: {
60
- type: Boolean,
61
- default: false
62
- },
63
- questionCount: {
64
- type: Number,
65
- default: 0
66
- },
67
- storeCount: {
68
- type: Number,
69
- default: 0
70
- },
71
- publishDate: {
72
- type: Date,
73
- },
74
- locationCount: {
75
- type: Number
76
- },
77
- checkListType: {
78
- type: String,
79
- default: "task",
80
- enum: ['task',"checklistTask",'cctv']
81
- },
82
- startTime:{
83
- type:Date
84
- },
85
- scheduleRepeatedType: {
86
- type: String,
87
- default: '',
88
- enum: ["daily"]
89
- },
90
- allowedMultiSubmit: {
91
- type: Boolean,
92
- default:false
93
- },
94
- approver:{
95
- type:Array,
96
- default:[]
97
- },
98
- checkListDescription:{
99
- type: String,
100
- },
101
- priorityType:{
102
- type:String
103
- },
104
- remainder:{
105
- type:Array,
106
- default:[]
107
- },
108
- },
109
- {
110
- strict: true,
111
- versionKey: false,
112
- timestamps: true,
113
- },
114
- );
115
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const processestaskconfigSchema = new mongoose.Schema({
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: mongoose.Schema.Types.ObjectId,
16
+ ref: 'taskConfig'
17
+ },
18
+ checkListName: {
19
+ type: String,
20
+ required:true
21
+ },
22
+ scheduleStartTime: {
23
+ type: String
24
+ },
25
+ scheduleEndTime: {
26
+ type: String
27
+ },
28
+ scheduleStartTime_iso: {
29
+ type: Date
30
+ },
31
+ scheduleEndTime_iso: {
32
+ type: Date
33
+ },
34
+ allowedOverTime: {
35
+ type: Boolean,
36
+ default:false
37
+ },
38
+ allowedStoreLocation: {
39
+ type: Boolean,
40
+ default:false
41
+ },
42
+ createdBy: {
43
+ type: mongoose.SchemaTypes.ObjectId,
44
+ },
45
+ createdByName: {
46
+ type: String,
47
+ },
48
+ questionAnswers: {
49
+ type: Array
50
+ },
51
+ createdAt: {
52
+ type: Date,
53
+ default: Date.now
54
+ },
55
+ updatedAt: {
56
+ type: Date,
57
+ default: Date.now
58
+ },
59
+ isdeleted: {
60
+ type: Boolean,
61
+ default: false
62
+ },
63
+ questionCount: {
64
+ type: Number,
65
+ default: 0
66
+ },
67
+ storeCount: {
68
+ type: Number,
69
+ default: 0
70
+ },
71
+ publishDate: {
72
+ type: Date,
73
+ },
74
+ locationCount: {
75
+ type: Number
76
+ },
77
+ checkListType: {
78
+ type: String,
79
+ default: "task",
80
+ enum: ['task',"checklistTask",'cctv']
81
+ },
82
+ startTime:{
83
+ type:Date
84
+ },
85
+ scheduleRepeatedType: {
86
+ type: String,
87
+ default: '',
88
+ enum: ["daily"]
89
+ },
90
+ allowedMultiSubmit: {
91
+ type: Boolean,
92
+ default:false
93
+ },
94
+ approver:{
95
+ type:Array,
96
+ default:[]
97
+ },
98
+ checkListDescription:{
99
+ type: String,
100
+ },
101
+ priorityType:{
102
+ type:String
103
+ },
104
+ remainder:{
105
+ type:Array,
106
+ default:[]
107
+ },
108
+ restrictAttendance:{
109
+ type:Boolean,
110
+ default:false
111
+ },
112
+ },
113
+ {
114
+ strict: true,
115
+ versionKey: false,
116
+ timestamps: true,
117
+ },
118
+ );
119
+
116
120
  export default mongoose.model( 'processedTaskConfig', processestaskconfigSchema);
@@ -1,44 +1,44 @@
1
- import mongoose from 'mongoose';
2
-
3
- const taskQuestionconfigSchema = new mongoose.Schema({
4
- question: {
5
- type: Array,
6
- required:true
7
- },
8
- section: {
9
- type: String,
10
- required:true
11
- },
12
- checkList: {
13
- type: String,
14
- required: true
15
- },
16
- checkListId: {
17
- type: mongoose.SchemaTypes.ObjectId,
18
- required: true
19
- },
20
- client_id: {
21
- type: String,
22
- required: true
23
- },
24
- createdAt: {
25
- type: Date,
26
- default: Date.now
27
- },
28
- updatedAt: {
29
- type: Date,
30
- default: Date.now
31
- },
32
- isdeleted: {
33
- type: Boolean,
34
- default: false
35
- },
36
- },
37
- {
38
- strict: true,
39
- versionKey: false,
40
- timestamps: true,
41
- },
42
- );
43
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const taskQuestionconfigSchema = new mongoose.Schema({
4
+ question: {
5
+ type: Array,
6
+ required:true
7
+ },
8
+ section: {
9
+ type: String,
10
+ required:true
11
+ },
12
+ checkList: {
13
+ type: String,
14
+ required: true
15
+ },
16
+ checkListId: {
17
+ type: mongoose.SchemaTypes.ObjectId,
18
+ required: true
19
+ },
20
+ client_id: {
21
+ type: String,
22
+ required: true
23
+ },
24
+ createdAt: {
25
+ type: Date,
26
+ default: Date.now
27
+ },
28
+ updatedAt: {
29
+ type: Date,
30
+ default: Date.now
31
+ },
32
+ isdeleted: {
33
+ type: Boolean,
34
+ default: false
35
+ },
36
+ },
37
+ {
38
+ strict: true,
39
+ versionKey: false,
40
+ timestamps: true,
41
+ },
42
+ );
43
+
44
44
  export default mongoose.model( 'taskQuestionsConfig', taskQuestionconfigSchema);
@@ -1,36 +1,36 @@
1
- import mongoose from 'mongoose';
2
-
3
- const traxApproverSchema = new mongoose.Schema({
4
- userEmail:{
5
- type:String,
6
- require:true
7
- },
8
- checkListId:{
9
- type:mongoose.Types.ObjectId,
10
- required:true
11
- },
12
- isDeleted:{
13
- type:Boolean,
14
- default:false
15
- },
16
- type:{
17
- type:String,
18
- enum:['checklist','task']
19
- },
20
- client_id:{
21
- type:String,
22
- default:''
23
- },
24
- checkListName:{
25
- type:String,
26
- default:''
27
- }
28
- },
29
- {
30
- strict: true,
31
- versionKey: false,
32
- timestamps: true,
33
- },
34
- );
35
-
1
+ import mongoose from 'mongoose';
2
+
3
+ const traxApproverSchema = new mongoose.Schema({
4
+ userEmail:{
5
+ type:String,
6
+ require:true
7
+ },
8
+ checkListId:{
9
+ type:mongoose.Types.ObjectId,
10
+ required:true
11
+ },
12
+ isDeleted:{
13
+ type:Boolean,
14
+ default:false
15
+ },
16
+ type:{
17
+ type:String,
18
+ enum:['checklist','task']
19
+ },
20
+ client_id:{
21
+ type:String,
22
+ default:''
23
+ },
24
+ checkListName:{
25
+ type:String,
26
+ default:''
27
+ }
28
+ },
29
+ {
30
+ strict: true,
31
+ versionKey: false,
32
+ timestamps: true,
33
+ },
34
+ );
35
+
36
36
  export default mongoose.model( 'traxApprover', traxApproverSchema);