aboutsummaryrefslogtreecommitdiff
path: root/ufund-api/src/main/java/com/ufund/api/ufundapi/model/User.java
blob: 011aeef866e9d703a8d20f8eb716e8e9c464524e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.ufund.api.ufundapi.model;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

public class User {

    @JsonProperty("name") private final String name;
    @JsonProperty("password") private String password;
    @JsonProperty("basket") private final List<Need> basket;

    /**
     * Create a new user
     * 
     * @param name     The name of the user
     * @param password The password of the user
     */
    public User(@JsonProperty("name") String name, @JsonProperty("basket") List<Need> basket) {
        this.name = name;
        this.basket = basket;
    }

    /**
     * Create a deep copy of another user
     *
     * @param other The user to copy from
     */
    public User(User other) {
        this.name = other.name;
        this.basket = other.basket;
    }

    public String getName() {
        return name;
    }

    public String getPassword() {
        return password;
    }
    
}