From 5638e8fdd5c00599072ca2376d6ea8da3636b32c Mon Sep 17 00:00:00 2001 From: Roar Date: Wed, 8 Apr 2026 18:18:20 +0200 Subject: [PATCH] Updated Charity Added parameters for the new SQL entries to the Charity object. --- .../systemutvikling/team6/models/Charity.java | 49 +++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/helpmehelpapplication/src/main/java/ntnu/systemutvikling/team6/models/Charity.java b/helpmehelpapplication/src/main/java/ntnu/systemutvikling/team6/models/Charity.java index 2addc07..4643d87 100644 --- a/helpmehelpapplication/src/main/java/ntnu/systemutvikling/team6/models/Charity.java +++ b/helpmehelpapplication/src/main/java/ntnu/systemutvikling/team6/models/Charity.java @@ -31,10 +31,18 @@ public class Charity { /* Category for the charity */ private String category; + /* Description for the charity */ + private String description; + + /* URL for the logo of the charity */ + private String logoURL; + + /* Key values for the charity */ + private String keyValues; + /* List that contains the charity's Feedbacks */ private List feedbacks; - /** * Contructor for creating a new charity. Taylored to match data given from Api. Other attributes * will just be initialized as empty @@ -78,8 +86,11 @@ public Charity( this.url = link; this.is_pre_approved = is_pre_approved; this.status = status; - this.feedbacks = new ArrayList<>(); this.category = ""; + this.description = ""; + this.logoURL = ""; + this.keyValues = ""; + this.feedbacks = new ArrayList<>(); } /** Getters for the charity's attributes. */ @@ -112,7 +123,19 @@ public String getName() { } public String getURL() { - return this.url; + return this.url; + } + + public String getDescription() { + return this.description; + } + + public String getLogoURL() { + return this.logoURL; + } + + public String getKeyValues() { + return this.keyValues; } /** Setter for verification status. This one sets the charity as verified. */ @@ -124,4 +147,24 @@ public void setVerified() { public void setUnverified() { this.status = "Veto"; } + + /** Setter for categories. */ + public void setCategory(String category) { + this.category = category; + } + + /** Setter for description. */ + public void setDescription(String description) { + this.description = description; + } + + /** Setter for the URL of the charity's logo. */ + public void setLogoURL(String url) { + this.logoURL = url; + } + + /** Setter for the charity's key values. */ + public void setKeyValues(String values) { + this.keyValues = values; + } }