Created
May 2, 2022 21:02
-
-
Save oliviagallucci/49fc6d696a8732192a281cdbc70147d6 to your computer and use it in GitHub Desktop.
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
/** | |
* Creates account entity according to provided authentication | |
* | |
* @param lastname: account user's lastname | |
* @param firstname: account user's firstname | |
* @param phonenumber: account user's phone number | |
* @param username: account username | |
* @param password: account password provided as json object | |
* @return Account: returns itself as object | |
*/ | |
public Account(@JsonProperty("LastName") String lastname, | |
@JsonProperty("FirstName") String firstname, | |
@JsonProperty("PhoneNumber") String phonenumber, | |
@JsonProperty("Username") String username, | |
@JsonProperty("Password") String password) { | |
this.lastname = lastname; | |
this.firstname = firstname; | |
this.phonenumber = phonenumber; | |
this.username = username; | |
this.password = password; | |
this.role = (this.username.equals("admin")) ? 0 : 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment