@resolveio/server-lib 4.0.2-newrole → 4.0.3-newrole
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/collections/user.collection.js +13 -0
- package/models/user.model.d.ts +11 -3
- package/package.json +1 -1
|
@@ -142,6 +142,19 @@ var schema = {
|
|
|
142
142
|
customer_type: {
|
|
143
143
|
type: String,
|
|
144
144
|
optional: true
|
|
145
|
+
},
|
|
146
|
+
departments: {
|
|
147
|
+
type: Array,
|
|
148
|
+
optional: true
|
|
149
|
+
},
|
|
150
|
+
'departments.$': {
|
|
151
|
+
type: Object
|
|
152
|
+
},
|
|
153
|
+
'departments.$.id_department': {
|
|
154
|
+
type: String
|
|
155
|
+
},
|
|
156
|
+
'departments.$.department': {
|
|
157
|
+
type: String
|
|
145
158
|
}
|
|
146
159
|
};
|
|
147
160
|
var DefaultSchema = new mongoose_1.Schema(schema, {
|
package/models/user.model.d.ts
CHANGED
|
@@ -3,18 +3,26 @@ export interface UserModel extends CollectionDocument {
|
|
|
3
3
|
attempts: number;
|
|
4
4
|
last: Date;
|
|
5
5
|
fullname: string;
|
|
6
|
-
roles: string[]
|
|
6
|
+
roles: string[];
|
|
7
7
|
readonly?: boolean;
|
|
8
8
|
username?: string;
|
|
9
9
|
email?: string;
|
|
10
10
|
active?: boolean;
|
|
11
11
|
services?: any;
|
|
12
12
|
phonenumber?: string;
|
|
13
|
-
other?:
|
|
13
|
+
other?: UserObject;
|
|
14
14
|
id_customer?: string;
|
|
15
15
|
customer?: string;
|
|
16
16
|
customer_type?: string;
|
|
17
|
-
customers
|
|
17
|
+
customers?: UserCustomersModel[];
|
|
18
|
+
departments?: UserDepartmentModel[];
|
|
19
|
+
}
|
|
20
|
+
export interface UserObject {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export interface UserDepartmentModel {
|
|
24
|
+
id_department: string;
|
|
25
|
+
department: string;
|
|
18
26
|
}
|
|
19
27
|
export interface UserRoleModel {
|
|
20
28
|
super_admin: boolean;
|