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 +1 -1
- package/schema/client.model.js +1 -22
- package/schema/mailOnlyuser.model.js +40 -0
- package/schema/store.model.js +4 -0
package/package.json
CHANGED
package/schema/client.model.js
CHANGED
|
@@ -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 );
|