From 4ab605201dcacf82c56ac321bec5c8d76eb2dce5 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 4 Feb 2018 16:48:43 +0100 Subject: [PATCH] Created notification model. --- classes/models/Notification.php | 134 ++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 classes/models/Notification.php diff --git a/classes/models/Notification.php b/classes/models/Notification.php new file mode 100644 index 0000000..83e8e4e --- /dev/null +++ b/classes/models/Notification.php @@ -0,0 +1,134 @@ +id = $id; + } + + /** + * Get notification iD + * + * @return int The ID of the notification + */ + public function get_id() : int { + return $this->id; + } + + /** + * Set notification creation time + * + * @param int $time The creation time + */ + public function set_time(int $time){ + $this->time = $time; + } + + /** + * Get notification time + * + * @return int The time of the notification + */ + public function get_time() : int { + return $this->time; + } + + /** + * Set the seen state of the notification + * + * @param bool $seen TRUE for seen + */ + public function set_seen(bool $seen){ + $this->seen = $seen; + } + + /** + * Get the seen state of the notification + * + * @return bool TRUE if the notification has been seen + * FALSE else + */ + public function is_seen() : bool { + return $this->seen; + } + + /** + * Set notification source user id + * + * @param int $notificatID The ID of the notification + */ + public function set_from_user_id(int $from_user_id){ + $this->from_user_id = $from_user_id; + } + + /** + * Get notification source user id + * + * @return int The id of the user who created the notification + */ + public function get_from_user_id() : int { + return $this->from_user_id; + } + + /** + * Set notification destination user id + * + * @param int $notificatID The ID of the notification + */ + public function set_dest_user_id(int $dest_user_id){ + $this->dest_user_id = $dest_user_id; + } + + /** + * Get notification destination user id + * + * @return int The dest_user_id of the notification + */ + public function get_dest_user_id() : int { + return $this->dest_user_id; + } + + +} \ No newline at end of file