@@ -17,6 +17,7 @@ pub struct UserAuthenticationMethod {
17
17
pub allow_signup : bool ,
18
18
pub created_at : PrimitiveDateTime ,
19
19
pub last_modified_at : PrimitiveDateTime ,
20
+ pub email_domain : String ,
20
21
}
21
22
22
23
#[ derive( router_derive:: Setter , Clone , Debug , Insertable , router_derive:: DebugAsDisplay ) ]
@@ -32,6 +33,7 @@ pub struct UserAuthenticationMethodNew {
32
33
pub allow_signup : bool ,
33
34
pub created_at : PrimitiveDateTime ,
34
35
pub last_modified_at : PrimitiveDateTime ,
36
+ pub email_domain : String ,
35
37
}
36
38
37
39
#[ derive( Clone , Debug , AsChangeset , router_derive:: DebugAsDisplay ) ]
@@ -40,13 +42,17 @@ pub struct OrgAuthenticationMethodUpdateInternal {
40
42
pub private_config : Option < Encryption > ,
41
43
pub public_config : Option < serde_json:: Value > ,
42
44
pub last_modified_at : PrimitiveDateTime ,
45
+ pub email_domain : Option < String > ,
43
46
}
44
47
45
48
pub enum UserAuthenticationMethodUpdate {
46
49
UpdateConfig {
47
50
private_config : Option < Encryption > ,
48
51
public_config : Option < serde_json:: Value > ,
49
52
} ,
53
+ EmailDomain {
54
+ email_domain : String ,
55
+ } ,
50
56
}
51
57
52
58
impl From < UserAuthenticationMethodUpdate > for OrgAuthenticationMethodUpdateInternal {
@@ -60,6 +66,13 @@ impl From<UserAuthenticationMethodUpdate> for OrgAuthenticationMethodUpdateInter
60
66
private_config,
61
67
public_config,
62
68
last_modified_at,
69
+ email_domain : None ,
70
+ } ,
71
+ UserAuthenticationMethodUpdate :: EmailDomain { email_domain } => Self {
72
+ private_config : None ,
73
+ public_config : None ,
74
+ last_modified_at,
75
+ email_domain : Some ( email_domain) ,
63
76
} ,
64
77
}
65
78
}
0 commit comments