diff options
| author | Gunther6070 <haydenhartman10@yahoo.com> | 2025-02-26 12:36:23 -0500 | 
|---|---|---|
| committer | Gunther6070 <haydenhartman10@yahoo.com> | 2025-02-26 12:36:23 -0500 | 
| commit | a9fed97547a698c7641aae53758deec6102f3360 (patch) | |
| tree | 638fdbb45bfcad7e8b012e6a6acd034493c1091f /ufund-api/src/main | |
| parent | c7ac2db02a39cf349f9434186996c93eebc17a3c (diff) | |
| download | JellySolutions-a9fed97547a698c7641aae53758deec6102f3360.tar.gz JellySolutions-a9fed97547a698c7641aae53758deec6102f3360.tar.bz2 JellySolutions-a9fed97547a698c7641aae53758deec6102f3360.zip  | |
Created user class with fields name and password
Diffstat (limited to 'ufund-api/src/main')
| -rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/model/User.java | 26 | 
1 files changed, 22 insertions, 4 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/User.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/User.java index 12bbddc..ed34817 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/User.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/User.java @@ -4,17 +4,35 @@ import com.fasterxml.jackson.annotation.JsonProperty;  public class User { -    @JsonProperty("name") private String name; +    @JsonProperty("name") private final String name; +    @JsonProperty("password") private String password;      /**       * Create a new user -     * -     * @param name    The name of the user +     *  +     * @param name     The name of the user +     * @param password The password of the user +     * @param id       The unique ID of the user       */      public User(String name) {          this.name = name;      } -     +    /** +     * Create a deep copy of another user +     * +     * @param other The user to copy from +     */ +    public User(User other) { +        this.name = other.name; +    } + +    public String getName() { +        return name; +    } + +    public String getPassword() { +        return password; +    }  }  | 
