Skip to content

Commit

Permalink
Added Message class
Browse files Browse the repository at this point in the history
  • 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.
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;
}

}

0 comments on commit 9cd4106

Please sign in to comment.