File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
packages/leemons-users/src
plugins/leemons-plugin-users/backend/models Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,12 @@ export interface User {
34
34
avatarAsset : AssetID ;
35
35
locale : string ;
36
36
gender : string ;
37
- bithdate : Date ;
37
+ birthdate : Date ;
38
38
center ?: Center ;
39
+ externalIdentities ?: {
40
+ provider : string ;
41
+ externalId : string ;
42
+ } [ ] ;
39
43
}
40
44
41
45
export interface UserAgent {
Original file line number Diff line number Diff line change 1
1
const { mongoose, newModel } = require ( '@leemons/mongodb' ) ;
2
2
3
+ const externalIdentitySchema = new mongoose . Schema ( {
4
+ provider : {
5
+ type : String ,
6
+ required : true ,
7
+ } ,
8
+ externalId : {
9
+ type : String ,
10
+ required : true ,
11
+ } ,
12
+ } ) ;
13
+
3
14
const schema = new mongoose . Schema (
4
15
{
5
16
id : {
@@ -58,6 +69,11 @@ const schema = new mongoose.Schema(
58
69
type : String ,
59
70
required : true ,
60
71
} ,
72
+ externalIdentities : {
73
+ type : [ externalIdentitySchema ] ,
74
+ required : false ,
75
+ default : [ ] ,
76
+ } ,
61
77
} ,
62
78
{
63
79
timestamps : true ,
You can’t perform that action at this time.
0 commit comments