wiki:UserCreatesReadingList

Version 1 (modified by 211099, 2 weeks ago) ( diff )

--

User Creates a Reading List

Authors: Regular User / Writer

A user creates a new personal reading list, choosing whether to make it public or private.

1. The user navigates to their profile and selects "Create New Reading List".

2. The system displays a form requesting the list name, description, and visibility setting.

3. The user fills in the details and selects whether the list is public or private.

4. The system inserts a new record into the READING_LIST table.

INSERT INTO READING_LIST (name, content, is_public, user_id, created_at, updated_at)
VALUES ('Sara''s Fantasy Favorites', 
        'My collection of the best fantasy stories with strong female leads', 
        TRUE, 4, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

5. The system confirms the reading list was created and redirects the user to their new empty list.

6. The system displays the reading list with zero stories added yet.

SELECT rl.list_id, rl.name, rl.content, rl.is_public, COUNT(rli.story_id) AS total_stories
FROM READING_LIST rl
LEFT JOIN READING_LIST_ITEMS rli ON rl.list_id = rli.list_id
WHERE rl.user_id = 4
GROUP BY rl.list_id;
Note: See TracWiki for help on using the wiki.