diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java index 3106d09..4a389f4 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Charity.java @@ -88,4 +88,11 @@ public void setVerified() { public void setUnverified() { this.isVerified = false; } + + /** + * Setter for total donations. This method is used to update the total donations when a new donation is made. + */ + public void setTotalDonations(int amount) { + this.totalDonations += amount; + } } diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class deleted file mode 100644 index 9e9f2a3..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/Main.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class deleted file mode 100644 index b2e6c9c..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Charity.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Donation.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Donation.class deleted file mode 100644 index 1408627..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Donation.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/DonationRegistry.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/DonationRegistry.class deleted file mode 100644 index 3974903..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/DonationRegistry.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Feedback.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Feedback.class deleted file mode 100644 index 1f4b3ad..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Feedback.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Inbox.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Inbox.class deleted file mode 100644 index 7b4a306..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Inbox.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Settings.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Settings.class deleted file mode 100644 index 38f482a..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/Settings.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/User.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/User.class deleted file mode 100644 index 7623153..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/User.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/UserRegistry.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/UserRegistry.class deleted file mode 100644 index 970aced..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/models/UserRegistry.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/AuthenticationService.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/AuthenticationService.class deleted file mode 100644 index 559ce48..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/AuthenticationService.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/CharityService.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/CharityService.class deleted file mode 100644 index c52d762..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/CharityService.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/DonationService.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/DonationService.class deleted file mode 100644 index 86d2996..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/DonationService.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/FeedbackService.class b/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/FeedbackService.class deleted file mode 100644 index 4b0e587..0000000 Binary files a/helpmehelpapplication/target/classes/ntnu/sytemutvikling/team6/service/FeedbackService.class and /dev/null differ diff --git a/helpmehelpapplication/target/classes/tempClassDiagram.puml b/helpmehelpapplication/target/classes/tempClassDiagram.puml deleted file mode 100644 index c32ad2a..0000000 --- a/helpmehelpapplication/target/classes/tempClassDiagram.puml +++ /dev/null @@ -1,307 +0,0 @@ -@startuml - - - -' ========================= - -' DOMAIN LAYER - -' ========================= - - - -package "Domain Layer" { - - - -class User { - - - idNext : static int - - - id : int - - - name : String - - - email : String - - - passwordHash : String - - - role : String - - - settings : Settings - - - inbox : Inbox - - - - + getUserId() : int - - + setUserId(id : int) - - + getUserName() : String - - + setUserName(name : String) - - + getUserEmail() : String - - + setUserEmail(email : String) - - + getUserPasswordHash() : String - - + setUserPasswordHash(passwordHash : String) - - + getUserRole() : String - - + setUserRole(role : String) - -} - - - -class Settings { - - - lightmode : boolean - - - language : String - - - anonymous : boolean - - - - + getSettings() : String - -} - - - -class Inbox { - - - messages : ArrayList - - - - + getMessages() : ArrayList - - + addMessage(message : Message) - - + removeMessage(message : Message) - -} - - - -class Message { - - - title : String - - - from : Charity - - - date : LocalDateTime - - - - + getTitle() : String - - + getFrom() : Charity - - + getDate() : LocalDateTime - -} - - - -class Charity { - - - idNext : static int - - - id : int - - - name : String - - - description : String - - - totalDonations : double - - - verified : boolean - - - category : String - - - - + getCharityId() : int - - + setCharityId(id : int) - - + getCharityName() : String - - + setCharityName(name : String) - - + getCharityDescription() : String - - + setCharityDescription(description : String) - - + getCharityTotalDonations() : double - - + setCharityTotalDonations(totalDonations : double) - -} - - - -abstract class Donation { - - - idNext : static int - - - id : int - - - amount : double - - - date : LocalDateTime - - - charity : Charity - - - user : User - - - - + getDonationId() : int - - + setDonationId(id : int) - - + getDonationAmount() : double - - + setDonationAmount(amount : double) - - + getDonationDate() : LocalDateTime - - + setDonationDate(date : LocalDateTime) - - + getDonorInfo() : String - -} - - - -class AnonymousDonation { - - - comment : String - -} - - - -class PublicDonation { - - - comment : String - -} - - - -class Feedback { - - - id : int - - - message : String - - - date : LocalDateTime - - - charityId : int - - - - + getId() : int - - + setId(id : int) - - + getMessage() : String - - + setMessage(message : String) - - + getDate() : LocalDateTime - - + setDate(date : LocalDateTime) - -} - - - -class UserRegistry { - - - users : List - - + addUser(user : User) - - + removeUser(user : User) - - + getUserById(id : int) : User - - + getAllUsers() : List - -} - - - -class CharityRegistry { - - - charities : List - - + addCharity(charity : Charity) - - + removeCharity(charity : Charity) - - + getCharityById(id : int) : Charity - - + getAllCharities() : List - -} - - - -class DonationRegistry { - - - donations : List - - + addDonation(donation : Donation) - - + removeDonation(donation : Donation) - - + getDonationById(id : int) : Donation - - + getAllDonations() : List - -} - - - -' Associations - -User "1" -- "0..*" Donation - -Charity "1" -- "0..*" Donation - - - -User "1" -- "0..*" Feedback - -Charity "1" -- "0..*" Feedback - - - -Donation <|-- AnonymousDonation - -Donation <|-- PublicDonation - - - -User "1" *-- "1" Settings - -User "1" *-- "1" Inbox - -Inbox "1" -- "0..*" Message - -Message "1" --> "1" Charity - - - -} \ No newline at end of file