I am creating a notification system so that when users in a group perform an action, it will notify all other users in the group. I want the notification to be marked as βreadβ or βunreadβ for each user in the group. Thanks to this, I can easily restore any unread notification to the user and display it. I am thinking of creating a notification table with the following fields.
+----------------------+ | notification | +----------------------+ | id | | userid | | content | | status (read/unread) | | time | +----------------------+
My question is:
!
- , :
Table Notification ------------------ not_id time content Table User ---------- u_id Table NotificationStatus ------------------------ id u_id not_id bool read
, , / .
.. .. : , "PQP" (user_id = 1) , ( , , ) ur ur
id = 1 userid =1 content = "Photo Added By User PQP" status = Unread time = currenttime
, evr some1 , .
:
Table: Events ---------------- event_id user_id (foreign key to users table) action_id (foreign key to actions table) time_stamp Table: Log ---------------- user_id (foreign key to users table) event_id (foreign key to events table) time_stamp
, X, event_id
.
, "" , . .."...