diff options
Diffstat (limited to 'ufund-api')
| -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; +    }  }  | 
