tango-api-schema 2.2.87 → 2.2.89

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.
@@ -1,132 +1,132 @@
1
- import mongoose from 'mongoose';
2
-
3
- const user = new mongoose.Schema(
4
- {
5
- userName: {
6
- type: String,
7
- },
8
- email: {
9
- type: String,
10
- required: true,
11
- unique: true,
12
- },
13
- userProfile:{
14
- type:String
15
- },
16
- countryCode: {
17
- type: String,
18
- },
19
- mobileNumber: {
20
- type: String,
21
- },
22
- clientId: {
23
- type: String,
24
- },
25
- role: {
26
- type: String,
27
- enum: [ 'superadmin', 'admin', 'user' ],
28
- default: 'user',
29
- },
30
- isActive: {
31
- type: Boolean,
32
- default: true,
33
- },
34
- permission: [
35
- {
36
- featureName: {
37
- type: String,
38
- },
39
- product: [
40
- {
41
- name: {
42
- type: String,
43
- },
44
- isView: {
45
- type: Boolean,
46
- },
47
- isEdit: {
48
- type: Boolean,
49
- },
50
- isDownload: {
51
- type: Boolean,
52
- },
53
- isDelete: {
54
- type: Boolean,
55
- },
56
- },
57
- ],
58
- },
59
- ],
60
- rolespermission: [
61
- {
62
- featureName: {
63
- type: String,
64
- },
65
- modules: [
66
- {
67
- name: {
68
- type: String,
69
- },
70
- isAdd: {
71
- type: Boolean,
72
- },
73
- isEdit: {
74
- type: Boolean,
75
- },
76
- },
77
- ],
78
- },
79
- ],
80
- userType:{
81
- type: String,
82
- enum:['tango','client','lead']
83
- },
84
- tangoUserType:{
85
- type: String,
86
- enum:['audit','dashboard']
87
- },
88
- password: {
89
- type: String
90
- },
91
- refreshToken:{
92
- type: String
93
- },
94
- twoFactorAuthentication : {
95
- code: {
96
- type: String
97
- },
98
- isEnable : {
99
- type: Boolean
100
- }
101
- },
102
- emailAlert: {
103
- infra: {
104
- type: Boolean,
105
- default: false
106
- }
107
- },
108
- employeeId:{
109
- type:String
110
- },
111
- assignedStores:{
112
- type:Array
113
- },
114
- fcmToken:{
115
- type:String,
116
- default:''
117
- },
118
- loginFrom:{
119
- type:String,
120
- enum: [ 'web', 'android', 'ios' ],
121
- default:'web'
122
- },
123
- },
124
- {
125
- strict: true,
126
- versionKey: false,
127
- timestamps: true,
128
- },
129
- );
130
-
131
-
132
- export default mongoose.model( 'user', user );
1
+ import mongoose from 'mongoose';
2
+
3
+ const user = new mongoose.Schema(
4
+ {
5
+ userName: {
6
+ type: String,
7
+ },
8
+ email: {
9
+ type: String,
10
+ required: true,
11
+ unique: true,
12
+ },
13
+ userProfile:{
14
+ type:String
15
+ },
16
+ countryCode: {
17
+ type: String,
18
+ },
19
+ mobileNumber: {
20
+ type: String,
21
+ },
22
+ clientId: {
23
+ type: String,
24
+ },
25
+ role: {
26
+ type: String,
27
+ enum: [ 'superadmin', 'admin', 'user' ],
28
+ default: 'user',
29
+ },
30
+ isActive: {
31
+ type: Boolean,
32
+ default: true,
33
+ },
34
+ permission: [
35
+ {
36
+ featureName: {
37
+ type: String,
38
+ },
39
+ product: [
40
+ {
41
+ name: {
42
+ type: String,
43
+ },
44
+ isView: {
45
+ type: Boolean,
46
+ },
47
+ isEdit: {
48
+ type: Boolean,
49
+ },
50
+ isDownload: {
51
+ type: Boolean,
52
+ },
53
+ isDelete: {
54
+ type: Boolean,
55
+ },
56
+ },
57
+ ],
58
+ },
59
+ ],
60
+ rolespermission: [
61
+ {
62
+ featureName: {
63
+ type: String,
64
+ },
65
+ modules: [
66
+ {
67
+ name: {
68
+ type: String,
69
+ },
70
+ isAdd: {
71
+ type: Boolean,
72
+ },
73
+ isEdit: {
74
+ type: Boolean,
75
+ },
76
+ },
77
+ ],
78
+ },
79
+ ],
80
+ userType:{
81
+ type: String,
82
+ enum:['tango','client','lead']
83
+ },
84
+ tangoUserType:{
85
+ type: String,
86
+ enum:['audit','dashboard']
87
+ },
88
+ password: {
89
+ type: String
90
+ },
91
+ refreshToken:{
92
+ type: String
93
+ },
94
+ twoFactorAuthentication : {
95
+ code: {
96
+ type: String
97
+ },
98
+ isEnable : {
99
+ type: Boolean
100
+ }
101
+ },
102
+ emailAlert: {
103
+ infra: {
104
+ type: Boolean,
105
+ default: false
106
+ }
107
+ },
108
+ employeeId:{
109
+ type:String
110
+ },
111
+ assignedStores:{
112
+ type:Array
113
+ },
114
+ fcmToken:{
115
+ type:String,
116
+ default:''
117
+ },
118
+ loginFrom:{
119
+ type:String,
120
+ enum: [ 'web', 'android', 'ios' ],
121
+ default:'web'
122
+ },
123
+ },
124
+ {
125
+ strict: true,
126
+ versionKey: false,
127
+ timestamps: true,
128
+ },
129
+ );
130
+
131
+
132
+ export default mongoose.model( 'user', user );