diff options
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java')
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java index 55a9441..35e81b3 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java @@ -17,6 +17,7 @@ public class Need { @JsonProperty("maxGoal") private double maxGoal; @JsonProperty("urgent") private boolean urgent; @JsonProperty("current") private double current; + @JsonProperty("description") private String description; /** * Create a new need, used by the controller @@ -27,14 +28,16 @@ public class Need { * @param maxGoal The maximum goal for this need * @param type The type of need (monetary, physical) * @param urgent The urgency of the need + * @param description The description of the need */ - public Need(@JsonProperty("name") String name, @JsonProperty("location") String location, @JsonProperty("id") int id, @JsonProperty("maxGoal") double maxGoal, @JsonProperty("type") GoalType type, @JsonProperty("urgent") boolean urgent) { + public Need(@JsonProperty("name") String name, @JsonProperty("location") String location, @JsonProperty("id") int id, @JsonProperty("maxGoal") double maxGoal, @JsonProperty("type") GoalType type, @JsonProperty("urgent") boolean urgent, @JsonProperty("Description") String description) { this.id = id; this.location = location; this.name = name; this.maxGoal = maxGoal; this.type = type; this.urgent = urgent; + this.description = description; } /** @@ -45,13 +48,15 @@ public class Need { * @param maxGoal The maximum goal for this need * @param type The type of need (monetary, physical) * @param urgent The urgency of the need + * @param description The description of the need */ - public Need(String name, String location, double maxGoal, GoalType type, boolean urgent) { + public Need(String name, String location, double maxGoal, GoalType type, boolean urgent, String description) { this.name = name; this.location = location; this.type = type; this.maxGoal = maxGoal; this.urgent = urgent; + this.description = description; } /** @@ -68,6 +73,7 @@ public class Need { this.maxGoal = other.maxGoal; this.current = other.current; this.urgent = other.urgent; + this.description = other.description; } public String getName() { @@ -94,6 +100,7 @@ public class Need { return current; } + public void setCurrent(double current) { this.current = current; } |