diff --git a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Message.java b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Message.java index e69de29..6a1d53e 100644 --- a/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Message.java +++ b/helpmehelpapplication/src/main/java/ntnu/sytemutvikling/team6/models/Message.java @@ -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; + } + +} \ No newline at end of file