Changes between Version 2 and Version 3 of RegularUserLikesStory
- Timestamp:
- 08/24/26 16:09:58 (13 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RegularUserLikesStory
v2 v3 2 2 3 3 === Actor: **Regular User** 4 4 5 A regular user likes a published story on the platform, and the writer receives a notification about it. 5 6 … … 23 24 }}} 24 25 25 **5.** The system inserts a new like record.26 **5.** The system inserts a new like record. 26 27 {{{#!sql 27 INSERT INTO LIKES (user_id, story_id, created_at)28 INSERT INTO LIKES (user_id, story_id, liked_at) 28 29 VALUES (4, 1, CURRENT_TIMESTAMP); 29 30 }}} … … 31 32 **6.** The system creates a notification for the writer. 32 33 {{{#!sql 33 INSERT INTO NOTIFICATION ( content, is_read,created_at)34 VALUES ('Sara liked your story "The Chronicles of Eldoria"', FALSE, CURRENT_TIMESTAMP);34 INSERT INTO NOTIFICATION (notification_content, content_type, is_read, user_id, story_id, notification_created_at) 35 VALUES ('Sara liked your story "The Chronicles of Eldoria"', 'like', FALSE, 2, 1, CURRENT_TIMESTAMP); 35 36 }}} 36 37 37 **7.** The system creates a notification for the writer. 38 {{{#!sql 39 INSERT INTO CONTENT_TYPE (notification_id, content_type) 40 VALUES (1, 'like'); 41 }}} 42 43 **8.** The system creates a notification for the writer. 44 {{{#!sql 45 INSERT INTO NOTIFY (user_id, story_id, notification_id) 46 VALUES (2, 1, 1); 47 }}} 48 49 **9.** The system updates the like count displayed on the story page. 38 **7.** The system updates the like count displayed on the story page.
