-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(user): added email addresses and phone numbers
- Loading branch information
1 parent
6b7a63d
commit 51887f2
Showing
18 changed files
with
548 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...nsions/zenei-user-account/runtime/src/main/java/dev/cloudeko/zenei/user/DatabaseUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dev.cloudeko.zenei.user; | ||
|
||
import io.smallrye.mutiny.Uni; | ||
import io.vertx.sqlclient.Row; | ||
import io.vertx.sqlclient.RowIterator; | ||
import io.vertx.sqlclient.RowSet; | ||
|
||
public class DatabaseUtil { | ||
public static Uni<Row> processNullableRow(RowSet<Row> rows) { | ||
if (rows.size() == 0) { | ||
return Uni.createFrom().nullItem(); | ||
} | ||
|
||
final RowIterator<Row> iterator = rows.iterator(); | ||
if (iterator.hasNext()) { | ||
return Uni.createFrom().item(iterator.next()); | ||
} | ||
|
||
return Uni.createFrom().nullItem(); | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
...nsions/zenei-user-account/runtime/src/main/java/dev/cloudeko/zenei/user/EmailAddress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package dev.cloudeko.zenei.user; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public class EmailAddress { | ||
|
||
private String email; | ||
private boolean primaryEmail; | ||
private boolean emailVerified; | ||
|
||
private LocalDateTime createdAt; | ||
private LocalDateTime updatedAt; | ||
|
||
public EmailAddress() { | ||
} | ||
|
||
public EmailAddress(String email, boolean verified, boolean primary) { | ||
this.email = email; | ||
this.emailVerified = verified; | ||
this.primaryEmail = primary; | ||
} | ||
|
||
public String getEmail() { | ||
return email; | ||
} | ||
|
||
public void setEmail(String email) { | ||
this.email = email; | ||
} | ||
|
||
public boolean isPrimaryEmail() { | ||
return primaryEmail; | ||
} | ||
|
||
public void setPrimaryEmail(boolean primaryEmail) { | ||
this.primaryEmail = primaryEmail; | ||
} | ||
|
||
public boolean isEmailVerified() { | ||
return emailVerified; | ||
} | ||
|
||
public void setEmailVerified(boolean emailVerified) { | ||
this.emailVerified = emailVerified; | ||
} | ||
|
||
public LocalDateTime getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(LocalDateTime createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public LocalDateTime getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(LocalDateTime updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...zenei-user-account/runtime/src/main/java/dev/cloudeko/zenei/user/EmailAddressManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dev.cloudeko.zenei.user; | ||
|
||
public interface EmailAddressManager { | ||
} |
62 changes: 62 additions & 0 deletions
62
extensions/zenei-user-account/runtime/src/main/java/dev/cloudeko/zenei/user/PhoneNumber.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package dev.cloudeko.zenei.user; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public class PhoneNumber { | ||
|
||
private String phoneNumber; | ||
private boolean primaryPhoneNumber; | ||
private boolean phoneNumberVerified; | ||
|
||
private LocalDateTime createdAt; | ||
private LocalDateTime updatedAt; | ||
|
||
public PhoneNumber() { | ||
} | ||
|
||
public PhoneNumber(String phoneNumber, boolean verified, boolean primary) { | ||
this.phoneNumber = phoneNumber; | ||
this.phoneNumberVerified = verified; | ||
this.primaryPhoneNumber = primary; | ||
} | ||
|
||
public String getPhoneNumber() { | ||
return phoneNumber; | ||
} | ||
|
||
public void setPhoneNumber(String phoneNumber) { | ||
this.phoneNumber = phoneNumber; | ||
} | ||
|
||
public boolean isPrimaryPhoneNumber() { | ||
return primaryPhoneNumber; | ||
} | ||
|
||
public void setPrimaryPhoneNumber(boolean primaryPhoneNumber) { | ||
this.primaryPhoneNumber = primaryPhoneNumber; | ||
} | ||
|
||
public boolean isPhoneNumberVerified() { | ||
return phoneNumberVerified; | ||
} | ||
|
||
public void setPhoneNumberVerified(boolean phoneNumberVerified) { | ||
this.phoneNumberVerified = phoneNumberVerified; | ||
} | ||
|
||
public LocalDateTime getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(LocalDateTime createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public LocalDateTime getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(LocalDateTime updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
.../zenei-user-account/runtime/src/main/java/dev/cloudeko/zenei/user/PhoneNumberManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package dev.cloudeko.zenei.user; | ||
|
||
public interface PhoneNumberManager { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.