@resolveio/server-lib 4.0.2 → 4.0.3
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
|
@@ -135,6 +135,19 @@ var schema = {
|
|
|
135
135
|
customer_type: {
|
|
136
136
|
type: String,
|
|
137
137
|
optional: true
|
|
138
|
+
},
|
|
139
|
+
departments: {
|
|
140
|
+
type: Array,
|
|
141
|
+
optional: true
|
|
142
|
+
},
|
|
143
|
+
'departments.$': {
|
|
144
|
+
type: Object
|
|
145
|
+
},
|
|
146
|
+
'departments.$.id_department': {
|
|
147
|
+
type: String
|
|
148
|
+
},
|
|
149
|
+
'departments.$.department': {
|
|
150
|
+
type: String
|
|
138
151
|
}
|
|
139
152
|
};
|
|
140
153
|
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;
|