diff --git a/src/main/java/org/ntlab/tampoposerver/models/Notification.java b/src/main/java/org/ntlab/tampoposerver/models/Notification.java index 101b9c9..12994c4 100644 --- a/src/main/java/org/ntlab/tampoposerver/models/Notification.java +++ b/src/main/java/org/ntlab/tampoposerver/models/Notification.java @@ -1,4 +1,49 @@ package org.ntlab.tampoposerver.models; public class Notification { + private String userId; + private String notificationId; + private String from; + private String text; + private String time; + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getNotificationId() { + return notificationId; + } + + public void setNotificationId(String notificationId) { + this.notificationId = notificationId; + } + + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } } diff --git a/src/main/java/org/ntlab/tampoposerver/repositories/NotificationRepository.java b/src/main/java/org/ntlab/tampoposerver/repositories/NotificationRepository.java index 7509ae4..bbaadfd 100644 --- a/src/main/java/org/ntlab/tampoposerver/repositories/NotificationRepository.java +++ b/src/main/java/org/ntlab/tampoposerver/repositories/NotificationRepository.java @@ -1,7 +1,19 @@ package org.ntlab.tampoposerver.repositories; +import org.ntlab.tampoposerver.models.Notification; import org.springframework.stereotype.Repository; +import java.util.HashMap; + @Repository public class NotificationRepository { + private HashMap> notificationMap = new HashMap<>(); + + public NotificationRepository() { + Notification n1 = new Notification(); + notificationMap.put("uid01", new HashMap<>()); + notificationMap.get("uid01").put("nid01", n1); + + Notification result = notificationMap.get("uid01").get("nid01"); + } }