-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robin Strand Prestmo
authored and
Robin Strand Prestmo
committed
Feb 19, 2026
1 parent
806dbbc
commit 9cd4106
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| package ntnu.sytemutvikling.team6.models; | ||
|
|
||
| import java.time.LocalDateTime; | ||
| import java.util.UUID; | ||
|
|
||
| // Unntakshåndtering mangler | ||
| // Enhetstester mangler | ||
|
|
||
| /** | ||
| * Represents a message | ||
| * | ||
| * @Author Robin Strand Prestmo | ||
| */ | ||
| public class Message { | ||
| private UUID id; | ||
| private String title; | ||
| private String from; | ||
| private String content; | ||
| private LocalDateTime timeAndDate; | ||
|
|
||
| /** | ||
| * Creates a message with an unique identifier. | ||
| * The message includes a title, a string who its from, | ||
| * content and the time and date. | ||
| * | ||
| * @param id an unique identifier using UUID | ||
| * @param title the title of the message | ||
| * @param from who the message is from | ||
| * @param content the content of the message | ||
| * @param timeAndDate when the message was sent. | ||
| */ | ||
| public Message(UUID id, | ||
| String title, | ||
| String from, | ||
| String content, | ||
| LocalDateTime timeAndDate) { | ||
| this.id = id; | ||
| this.title = title; | ||
| this.from = from; | ||
| this.content = content; | ||
| this.timeAndDate = timeAndDate; | ||
| } | ||
|
|
||
| public UUID getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public String getTitle() { | ||
| return title; | ||
| } | ||
|
|
||
| public String getFrom() { | ||
| return from; | ||
| } | ||
|
|
||
| public String getContent() { | ||
| return content; | ||
| } | ||
|
|
||
| public LocalDateTime getTimeAndDate() { | ||
| return timeAndDate; | ||
| } | ||
|
|
||
| } |