Project

General

Profile

Task #172

Updated by Dana Basheer about 2 months ago

The Message Notification Module alerts users when they receive a new message from another profile. 

 When a user sends a message, the system automatically creates a notification for the receiver so they know someone has contacted them 

 **Table** 

 message_notification_table 

 * id 	 INT 	 PK 	 Unique notification ID 
 * sender_profile_id 	 INT 	 FK 	 Profile who sent the message 
 * receiver_profile_id 	 INT 	 FK 	 Profile receiving message 
 * message_id 	 INT 	 FK 	 Reference message 
 * notification_text 	 VARCHAR(300) 	 — 	 Notification message 
 * is_read 	 BOOLEAN 	 — 	 Read status 
 * created_at 	 DATETIME 	 — 	 Notification created time 
 * is_active 	 BOOLEAN 	 — 	 Status 
 
 **Validations** 

 sender_profile_id 

 * Mandatory 
 * Must exist in registration_table 
 * Must be active profile 

 receiver_profile_id 

 * Mandatory 
 * Must exist in registration_table 
 * Must be active profile 

 message_id 

 * Mandatory 
 * Must exist in user_message_table 

 notification_text 

 * Mandatory 
 * Maximum length: 300 characters 

 is_read 

 * Default value: false 
 * Becomes true when user opens message 

 created_at 

 * Auto-generated timestamp 

 is_active 

 * Default value: true

Back