Skip to content

models based on current class diagram #23

Merged
merged 1 commit into from
Feb 19, 2026
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package ntnu.sytemutvikling.team6.models;

public class AnonymousDonation extends Donation {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ntnu.sytemutvikling.team6.models;

public class Charity {
abstract class Charity {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package ntnu.sytemutvikling.team6.models;

public class DonationRegistry {

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package ntnu.sytemutvikling.team6.models;

public class Role {
public class Inbox {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package ntnu.sytemutvikling.team6.models;

public class PublicDonation extends Donation {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package ntnu.sytemutvikling.team6.models;

public class Settings {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package ntnu.sytemutvikling.team6.models;

public class UserRegistry {

}
307 changes: 307 additions & 0 deletions helpmehelpapplication/src/main/resources/tempClassDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
@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



}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading