diff options
author | sowgro <tpoke.ferrari@gmail.com> | 2025-02-16 15:53:52 -0500 |
---|---|---|
committer | sowgro <tpoke.ferrari@gmail.com> | 2025-02-16 15:53:52 -0500 |
commit | b25ec2813c14d21824e8d1af78ac478b35bac8bc (patch) | |
tree | efb567ceb3139430ce1f16911ded49b95a09135f /ufund-api/src/main/java | |
parent | c107ee3b8013e4e4c7308788bff9d44b419ce74b (diff) | |
download | JellySolutions-b25ec2813c14d21824e8d1af78ac478b35bac8bc.tar.gz JellySolutions-b25ec2813c14d21824e8d1af78ac478b35bac8bc.tar.bz2 JellySolutions-b25ec2813c14d21824e8d1af78ac478b35bac8bc.zip |
Add jsonProperty decorations
Diffstat (limited to 'ufund-api/src/main/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; |