tango-api-schema 2.3.5 → 2.3.6

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.3.5",
3
+ "version": "2.3.6",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,56 +1,126 @@
1
1
  import mongoose from 'mongoose';
2
2
 
3
3
  const fixtureConfigSchema = new mongoose.Schema(
4
- {
5
- clientId: {
4
+ {
5
+ clientId: {
6
+ type: String,
7
+ required: true,
8
+ },
9
+ fixtureCategory: {
10
+ type: String,
11
+ },
12
+ fixtureType: {
13
+ type: String,
14
+ enum: ['wall', 'floor'],
15
+ },
16
+ fixtureName: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ description: {
21
+ type: String,
22
+ },
23
+ fixtureLength: {
24
+ value: {
25
+ type: Number,
26
+ default: 0,
27
+ },
28
+ unit: {
6
29
  type: String,
7
- required: true,
30
+ default: '',
8
31
  },
9
- fixtureCategory: {
32
+ },
33
+ fixtureWidth: {
34
+ value: {
35
+ type: Number,
36
+ default: 0,
37
+ },
38
+ unit: {
10
39
  type: String,
40
+ default: '',
11
41
  },
12
- fixtureType: {
42
+ },
43
+ fixtureStaticLength: {
44
+ value: {
45
+ type: Number,
46
+ default: 0,
47
+ },
48
+ unit: {
13
49
  type: String,
14
- enum: [ 'wall', 'floor' ],
50
+ default: '',
15
51
  },
16
- fixtureName: {
52
+ },
53
+ fixtureStaticWidth: {
54
+ value: {
55
+ type: Number,
56
+ default: 0,
57
+ },
58
+ unit: {
17
59
  type: String,
60
+ default: '',
61
+ },
62
+ },
63
+ shelfConfig: [{
64
+ shelfNumber: {
65
+ type: Number,
18
66
  required: true,
19
67
  },
20
- description: {
68
+ shelfType: {
21
69
  type: String,
70
+ enum: ['shelf', 'tray'],
22
71
  },
23
- fixtureLength: {
24
- value: {
25
- type: Number,
26
- default: 0,
72
+ productPerShelf: {
73
+ type: Number,
74
+ default: 0,
75
+ },
76
+ trayRows: {
77
+ type: Number,
78
+ default: 0,
79
+ },
80
+ label: {
81
+ type: String,
82
+ default: '',
83
+ },
84
+ productBrandName: {
85
+ type: Array,
86
+ },
87
+ productSubBrandName: {
88
+ type: Array,
89
+ },
90
+ productCategory: {
91
+ type: Array
92
+ },
93
+ productSubCategory: {
94
+ type: Array
95
+ },
96
+ zone: {
97
+ type: String,
98
+ },
99
+ }],
100
+ vmConfig: [
101
+ {
102
+ vmId: {
103
+ type: mongoose.Types.ObjectId,
27
104
  },
28
- unit: {
29
- type: String,
30
- default: '',
105
+ startYPosition: {
106
+ type: Number,
31
107
  },
32
- },
33
- fixtureWidth: {
34
- value: {
108
+ endYPosition: {
35
109
  type: Number,
36
- default: 0,
37
110
  },
38
- unit: {
111
+ xZone: {
39
112
  type: String,
40
- default: '',
41
113
  },
42
- },
43
- fixtureStaticLength: {
44
- value: {
45
- type: Number,
46
- default: 0,
114
+ yZone: {
115
+ type: String,
47
116
  },
48
- unit: {
117
+ position: {
49
118
  type: String,
50
- default: '',
51
119
  },
52
120
  },
53
- fixtureStaticWidth: {
121
+ ],
122
+ header: {
123
+ height: {
54
124
  value: {
55
125
  type: Number,
56
126
  default: 0,
@@ -60,160 +130,94 @@ const fixtureConfigSchema = new mongoose.Schema(
60
130
  default: '',
61
131
  },
62
132
  },
63
- shelfConfig: [ {
64
- shelfNumber: {
65
- type: Number,
66
- required: true,
67
- },
68
- shelfType: {
69
- type: String,
70
- enum: ['shelf', 'tray'],
71
- },
72
- productPerShelf: {
73
- type: Number,
74
- default: 0,
75
- },
76
- trayRows: {
133
+ label: {
134
+ type: String,
135
+ },
136
+ isEnabled: {
137
+ type: Boolean,
138
+ default: true,
139
+ },
140
+ },
141
+ footer: {
142
+ height: {
143
+ value: {
77
144
  type: Number,
78
145
  default: 0,
79
146
  },
80
- label: {
147
+ unit: {
81
148
  type: String,
82
149
  default: '',
83
150
  },
84
- productBrandName: {
85
- type: Array,
86
- },
87
- productSubBrandName: {
88
- type: Array,
89
- },
90
- productCategory:{
91
- type:Array
92
151
  },
93
- productSubCategory:{
94
- type:Array
95
- },
96
- zone: {
97
- type: String,
98
- },
99
- } ],
100
- vmConfig: [
101
- {
102
- vmId: {
103
- type: mongoose.Types.ObjectId,
104
- },
105
- startYPosition: {
106
- type: Number,
107
- },
108
- endYPosition: {
109
- type: Number,
110
- },
111
- xZone: {
112
- type: String,
113
- },
114
- yZone: {
115
- type: String,
116
- },
117
- position: {
118
- type: String,
119
- },
120
- },
121
- ],
122
- header: {
123
- height: {
124
- value: {
125
- type: Number,
126
- default: 0,
127
- },
128
- unit: {
129
- type: String,
130
- default: '',
131
- },
132
- },
133
- label: {
134
- type: String,
135
- },
136
- isEnabled: {
137
- type: Boolean,
138
- default: true,
139
- },
140
- },
141
- footer: {
142
- height: {
143
- value: {
144
- type: Number,
145
- default: 0,
146
- },
147
- unit: {
148
- type: String,
149
- default: '',
150
- },
151
- },
152
- label: {
153
- type: String,
154
- },
155
- isEnabled: {
156
- type: Boolean,
157
- default: true,
158
- },
152
+ label: {
153
+ type: String,
159
154
  },
160
- isBodyEnabled: {
155
+ isEnabled: {
161
156
  type: Boolean,
162
157
  default: true,
163
158
  },
164
- productResolutionLevel: {
165
- type: String,
166
- enum: [ 'L1', 'L2', 'L3', 'L4' ],
167
- },
168
- fixtureLibraryId:{
159
+ },
160
+ isBodyEnabled: {
161
+ type: Boolean,
162
+ default: true,
163
+ },
164
+ productResolutionLevel: {
165
+ type: String,
166
+ enum: ['L1', 'L2', 'L3', 'L4'],
167
+ },
168
+ fixtureLibraryId: {
169
169
  type: mongoose.Types.ObjectId,
170
170
  required: true,
171
- },
172
- fixtureCapacity: {
173
- type: Number,
174
- default: 0,
175
- },
176
- productBrandName: {
177
- type: Array,
178
- },
179
- productCategory:{
180
- type:Array
181
- },
182
- productSubCategory:{
183
- type:Array
184
- },
185
- status: {
186
- type: String,
187
- enum: [ 'draft', 'complete' ],
188
- default: 'draft',
189
- },
190
- crestMapKey: {
191
- type: String,
192
- },
193
- templateIndex: {
194
- type: Number,
195
- default: 1,
196
- },
197
- templateType:{
171
+ index: true
172
+ },
173
+ fixtureCapacity: {
174
+ type: Number,
175
+ default: 0,
176
+ },
177
+ productBrandName: {
178
+ type: Array,
179
+ },
180
+ productCategory: {
181
+ type: Array
182
+ },
183
+ productSubCategory: {
184
+ type: Array
185
+ },
186
+ status: {
198
187
  type: String,
199
- enum: [ 'master', 'sub' ],
200
- default: 'sub'
201
- },
202
- masterTemplateId:{
188
+ enum: ['draft', 'complete'],
189
+ default: 'draft',
190
+ },
191
+ crestMapKey: {
192
+ type: String,
193
+ },
194
+ templateIndex: {
195
+ type: Number,
196
+ default: 1,
197
+ },
198
+ templateType: {
199
+ type: String,
200
+ enum: ['master', 'sub'],
201
+ default: 'sub',
202
+ index: true
203
+ },
204
+ masterTemplateId: {
203
205
  type: mongoose.Types.ObjectId,
204
- },
205
- templateGroupName: {
206
- type: String,
207
- },
208
- isEdited:{
209
- type: Boolean,
210
- }
206
+ index: true
211
207
  },
212
- {
213
- strict: true,
214
- versionKey: false,
215
- timestamps: true,
208
+ templateGroupName: {
209
+ type: String,
210
+ index: true
216
211
  },
212
+ isEdited: {
213
+ type: Boolean,
214
+ }
215
+ },
216
+ {
217
+ strict: true,
218
+ versionKey: false,
219
+ timestamps: true,
220
+ },
217
221
  );
218
222
 
219
- export default mongoose.model( 'fixtureConfig', fixtureConfigSchema );
223
+ export default mongoose.model('fixtureConfig', fixtureConfigSchema);