tango-api-schema 2.0.23 → 2.0.24

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.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,28 @@
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const group = new mongoose.Schema(
5
+ {
6
+ user: {
7
+ type: mongoose.Types.ObjectId,
8
+ },
9
+ token: {
10
+ type:Array
11
+ },
12
+ refreshToken:{
13
+ type: String
14
+ },
15
+ type: {
16
+ type: String,
17
+ enum: ['retail']
18
+ }
19
+ },
20
+ {
21
+ strict: true,
22
+ versionKey: false,
23
+ timestamps: true,
24
+ },
25
+ );
26
+
27
+ group.plugin( mongooseUniqueValidator );
28
+ export default mongoose.model( 'group', group);
@@ -0,0 +1,27 @@
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const group = new mongoose.Schema(
5
+ {
6
+ groupName: {
7
+ type: String,
8
+ },
9
+ storeList: {
10
+ type:Array
11
+ },
12
+ clientId:{
13
+ type: String
14
+ },
15
+ description: {
16
+ type: String
17
+ }
18
+ },
19
+ {
20
+ strict: true,
21
+ versionKey: false,
22
+ timestamps: true,
23
+ },
24
+ );
25
+
26
+ group.plugin( mongooseUniqueValidator );
27
+ export default mongoose.model( 'group', group);
@@ -0,0 +1,37 @@
1
+ import mongoose from 'mongoose';
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator';
3
+
4
+ const userAssigned = new mongoose.Schema(
5
+ {
6
+ userEmail: {
7
+ type: String,
8
+ required: true,
9
+ unique: true,
10
+ },
11
+ clientId:{
12
+ type: String
13
+ },
14
+ Assigned: {
15
+ type: {
16
+ type: String,
17
+ enum: [ 'store', 'group' , 'client'],
18
+ },
19
+ list: {
20
+ type: Array,
21
+ },
22
+ },
23
+ userType:{
24
+ type: String,
25
+ enum:['tango','client']
26
+ },
27
+
28
+ },
29
+ {
30
+ strict: true,
31
+ versionKey: false,
32
+ timestamps: true,
33
+ },
34
+ );
35
+
36
+ userAssigned.plugin( mongooseUniqueValidator );
37
+ export default mongoose.model( 'userAssignedStore', userAssigned ,'userAssignedStore');