Changes between Version 2 and Version 3 of RegularUserLikesStory


Ignore:
Timestamp:
08/24/26 16:09:58 (13 days ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RegularUserLikesStory

    v2 v3  
    22
    33=== Actor: **Regular User**
     4
    45A regular user likes a published story on the platform, and the writer receives a notification about it.
    56
     
    2324}}}
    2425
    25 **5.**  The system inserts a new like record.
     26**5.** The system inserts a new like record.
    2627{{{#!sql
    27 INSERT INTO LIKES (user_id, story_id, created_at)
     28INSERT INTO LIKES (user_id, story_id, liked_at)
    2829VALUES (4, 1, CURRENT_TIMESTAMP);
    2930}}}
     
    3132**6.** The system creates a notification for the writer.
    3233{{{#!sql
    33 INSERT INTO NOTIFICATION (content, is_read, created_at)
    34 VALUES ('Sara liked your story "The Chronicles of Eldoria"', FALSE, CURRENT_TIMESTAMP);
     34INSERT INTO NOTIFICATION (notification_content, content_type, is_read, user_id, story_id, notification_created_at)
     35VALUES ('Sara liked your story "The Chronicles of Eldoria"', 'like', FALSE, 2, 1, CURRENT_TIMESTAMP);
    3536}}}
    3637
    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.