tango-api-schema 2.1.17 → 2.1.19

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.1.17",
3
+ "version": "2.1.19",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -147,28 +147,7 @@ const client = new mongoose.Schema(
147
147
  enum:[0,1],
148
148
  default:0
149
149
  },
150
- infraReport:{
151
- start:{
152
- type:String,
153
- default:"09:00"
154
- },
155
- end:{
156
- type:String,
157
- default:"19:00"
158
-
159
- }
160
- },
161
- infraReport:{
162
- start:{
163
- type:String,
164
- default:"9:00"
165
- },
166
- end:{
167
- type:String,
168
- default:"19:00"
169
-
170
- }
171
- },
150
+ infraReport:{},
172
151
  infraDownTime: {
173
152
  type: Number,
174
153
  default:1,
@@ -0,0 +1,40 @@
1
+ import uniqueValidator from 'mongoose-unique-validator';
2
+ import mongoose from 'mongoose';
3
+
4
+ // schema
5
+ const collection = new mongoose.Schema( {
6
+ email: {
7
+ type: String,
8
+ trim: true,
9
+ unique: true,
10
+ required:true
11
+ },
12
+ clientId:{
13
+ trim: true,
14
+ required:true
15
+ },
16
+ name: {
17
+ type: String,
18
+ },
19
+ stores:{
20
+ type:Array
21
+ },
22
+ groups:{
23
+ type:Array
24
+ },
25
+ status: {
26
+ type: String,
27
+ enum: [ 'active' , 'deactive'],
28
+ default:"active"
29
+ },
30
+ },
31
+ {
32
+ timestamps: true,
33
+ strict: true,
34
+ versionKey: false,
35
+ } );
36
+
37
+ collection.plugin( uniqueValidator );
38
+ collection.index( { email: 1} );
39
+
40
+ export default mongoose.model( 'mailOnlyUser', collection );
@@ -216,6 +216,10 @@ const store = new mongoose.Schema(
216
216
  privacyEnabled:{
217
217
  type: Boolean,
218
218
  default: false
219
+ },
220
+ eyeTestTime:{
221
+ type: Number,
222
+ trim: true,
219
223
  }
220
224
  },
221
225
  spocDetails: [