tango-api-schema 2.1.32 → 2.1.34
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 +5 -1
- package/package.json +1 -1
- package/schema/cluster.model.js +67 -0
- package/schema/teams.model.js +54 -0
- package/schema/user.model.js +23 -0
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
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
clusterName: {
|
|
10
|
+
type: String
|
|
11
|
+
},
|
|
12
|
+
description: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
stores: [
|
|
16
|
+
{
|
|
17
|
+
storeId: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
store: {
|
|
21
|
+
type: mongoose.Types.ObjectId
|
|
22
|
+
},
|
|
23
|
+
storeName: {
|
|
24
|
+
type: String
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
Teamlead: [
|
|
29
|
+
{
|
|
30
|
+
userName: {
|
|
31
|
+
type: String,
|
|
32
|
+
},
|
|
33
|
+
email: {
|
|
34
|
+
type: String,
|
|
35
|
+
},
|
|
36
|
+
userId: {
|
|
37
|
+
type: String
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
users: [
|
|
42
|
+
{
|
|
43
|
+
userName: {
|
|
44
|
+
type: String,
|
|
45
|
+
},
|
|
46
|
+
email: {
|
|
47
|
+
type: String,
|
|
48
|
+
},
|
|
49
|
+
userId: {
|
|
50
|
+
type: String
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
status: {
|
|
55
|
+
type: String
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
strict: true,
|
|
61
|
+
versionKey: false,
|
|
62
|
+
timestamps: true,
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
clusterSchema.plugin(mongooseUniqueValidator);
|
|
67
|
+
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);
|
package/schema/user.model.js
CHANGED
|
@@ -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']
|