tango-api-schema 2.1.32 → 2.1.33

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/index.js CHANGED
@@ -45,6 +45,8 @@ import auditUserWalletModel from "./schema/auditUserWallet.model.js";
45
45
  import mailOnlyuserModel from "./schema/mailOnlyuser.model.js";
46
46
  import empDetectionOutputModel from "./schema/empDetectionOutput.model.js";
47
47
  import auditUsersModel from "./schema/auditUsers.model.js";
48
+ import clusterModel from "./schema/cluster.model.js";
49
+ import teamsModel from "./schema/teams.model.js";
48
50
 
49
51
 
50
52
 
@@ -96,5 +98,7 @@ export default {
96
98
  auditUserWalletModel,
97
99
  mailOnlyuserModel,
98
100
  empDetectionOutputModel,
99
- auditUsersModel
101
+ auditUsersModel,
102
+ clusterModel,
103
+ teamsModel
100
104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.1.32",
3
+ "version": "2.1.33",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,61 @@
1
+ import mongoose from 'mongoose'
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator'
3
+
4
+ let clusterSchema = new mongoose.Schema(
5
+ {
6
+ clientId: {
7
+ type: String
8
+ },
9
+ stores: [
10
+ {
11
+ storeId: {
12
+ type: String,
13
+ },
14
+ store: {
15
+ type: mongoose.Types.ObjectId
16
+ },
17
+ storeName: {
18
+ type: String
19
+ }
20
+ }
21
+ ],
22
+ Teamlead: [
23
+ {
24
+ userName: {
25
+ type: String,
26
+ },
27
+ email: {
28
+ type: String,
29
+ },
30
+ userId: {
31
+ type: String
32
+ }
33
+ }
34
+ ],
35
+ users: [
36
+ {
37
+ userName: {
38
+ type: String,
39
+ },
40
+ email: {
41
+ type: String,
42
+ },
43
+ userId: {
44
+ type: String
45
+ }
46
+ }
47
+ ],
48
+ status: {
49
+ type: String
50
+ },
51
+
52
+ },
53
+ {
54
+ strict: true,
55
+ versionKey: false,
56
+ timestamps: true,
57
+ }
58
+ )
59
+
60
+ clusterSchema.plugin(mongooseUniqueValidator);
61
+ export default mongoose.model('cluster', clusterSchema);
@@ -0,0 +1,54 @@
1
+ import mongoose from 'mongoose'
2
+ import mongooseUniqueValidator from 'mongoose-unique-validator'
3
+
4
+ let teamsSchema = new mongoose.Schema(
5
+ {
6
+ clientId: {
7
+ type: String
8
+ },
9
+ teamName: {
10
+ type: String
11
+ },
12
+ description: {
13
+ type: String
14
+ },
15
+ Teamlead: [
16
+ {
17
+ userName: {
18
+ type: String,
19
+ },
20
+ email: {
21
+ type: String,
22
+ },
23
+ userId: {
24
+ type: String
25
+ }
26
+ }
27
+ ],
28
+ users: [
29
+ {
30
+ userName: {
31
+ type: String,
32
+ },
33
+ email: {
34
+ type: String,
35
+ },
36
+ userId: {
37
+ type: String
38
+ }
39
+ }
40
+ ],
41
+ status: {
42
+ type: String
43
+ },
44
+
45
+ },
46
+ {
47
+ strict: true,
48
+ versionKey: false,
49
+ timestamps: true,
50
+ }
51
+ )
52
+
53
+ teamsSchema.plugin(mongooseUniqueValidator);
54
+ export default mongoose.model('teams', teamsSchema);
@@ -59,6 +59,29 @@ const user = new mongoose.Schema(
59
59
  ],
60
60
  },
61
61
  ],
62
+ rolespermission: [
63
+ {
64
+ featureName: {
65
+ type: String,
66
+ },
67
+ modules: [
68
+ {
69
+ name: {
70
+ type: String,
71
+ },
72
+ isAdd: {
73
+ type: Boolean,
74
+ },
75
+ isEdit: {
76
+ type: Boolean,
77
+ },
78
+ isDelete: {
79
+ type: Boolean,
80
+ },
81
+ },
82
+ ],
83
+ },
84
+ ],
62
85
  userType:{
63
86
  type: String,
64
87
  enum:['tango','client','lead']