-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotification.cpp
More file actions
17 lines (13 loc) · 783 Bytes
/
Copy pathNotification.cpp
File metadata and controls
17 lines (13 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "../include/Notification.h"
Notification::Notification(std::string nId, std::string uId, std::string msg, std::string time, bool read)
: notificationId(nId), userId(uId), message(msg), timestamp(time), isRead(read) {}
std::string Notification::getNotificationId() const { return notificationId; }
std::string Notification::getUserId() const { return userId; }
std::string Notification::getMessage() const { return message; }
std::string Notification::getTimestamp() const { return timestamp; }
bool Notification::getIsRead() const { return isRead; }
void Notification::markAsRead() { isRead = true; }
void Notification::displayNotification() const {
std::cout << "[" << timestamp << "] " << (isRead ? "(Read) " : "(UNREAD) ")
<< message << "\n";
}