diff options
author | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-02-16 17:04:48 -0500 |
---|---|---|
committer | Akash Keshav <112591754+domesticchores@users.noreply.github.com> | 2025-02-16 17:04:48 -0500 |
commit | ad68ff259acd63818112b9997d093051dd3344ca (patch) | |
tree | b958bf84f9afb794635f631c1d7072750170d80e /ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java | |
parent | ae0bff7e12edbd6f4e76cf32468f5d5607e770a6 (diff) | |
parent | b25ec2813c14d21824e8d1af78ac478b35bac8bc (diff) | |
download | JellySolutions-ad68ff259acd63818112b9997d093051dd3344ca.tar.gz JellySolutions-ad68ff259acd63818112b9997d093051dd3344ca.tar.bz2 JellySolutions-ad68ff259acd63818112b9997d093051dd3344ca.zip |
Merge branch 'main' of https://github.com/RIT-SWEN-261-02/team-project-2245-swen-261-02-2b
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 | 16 |
1 files changed, 9 insertions, 7 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 9187796..2611357 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 @@ -1,5 +1,7 @@ package com.ufund.api.ufundapi.model; +import com.fasterxml.jackson.annotation.JsonProperty; + public class Need { public enum GoalType { @@ -7,12 +9,12 @@ public class Need { PHYSICAL } - private String name; - private int id; - private String[] filterAttributes; - final private GoalType type; - private double maxGoal; - private double current; + @JsonProperty("name") private String name; + @JsonProperty("id") private int id; + @JsonProperty("filterAttributes") private String[] filterAttributes; + @JsonProperty("type") final private GoalType type; + @JsonProperty("maxGoal") private double maxGoal; + @JsonProperty("Current") private double current; /** * Create a new need @@ -22,7 +24,7 @@ public class Need { * @param maxGoal The maximum goal for this need * @param type The type of need (monetary, physical) */ - public Need(String name, int id, double maxGoal, GoalType type) { + public Need(@JsonProperty("name") String name, @JsonProperty("id") int id, @JsonProperty("maxGoal") double maxGoal, GoalType type) { this.id = id; this.name = name; this.maxGoal = maxGoal; |