Changes between Initial Version and Version 1 of WriterAddsChapterToStory


Ignore:
Timestamp:
03/04/26 15:43:37 (3 weeks ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WriterAddsChapterToStory

    v1 v1  
     1==  Writer Adds a Chapter to a Story
     2
     3=== Authors: **Writter**
     4A writer adds a new chapter to an existing published or draft story, providing chapter details such as title, content, and chapter number.
     5
     6**1.** The writer navigates to their story and selects "Add New Chapter".
     7
     8**2.** The system displays the chapter creation form requesting chapter number, chapter name, title, and content.
     9
     10**3.** The system checks what chapter number should come next.
     11
     12{{{#!sql
     13SELECT MAX(chapter_number) + 1 AS next_chapter
     14FROM CHAPTER
     15WHERE story_id = 1;
     16}}}
     17**4.** The writer fills in all chapter details and submits the form.
     18
     19**5.** The system inserts a new record into the CHAPTER table.
     20
     21{{{#!sql
     22INSERT INTO CHAPTER (chapter_number, chapter_name, title, content, word_count, published_at, view_count, story_id, created_at, updated_at)
     23VALUES (4, 'Chapter Four', 'The Council of Kings',
     24'Lyra stood before the five thrones, her heart hammering...',
     253800, CURRENT_TIMESTAMP, 0, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
     26}}}
     27
     28**6.** The system notifies all users who have the story in their reading list.
     29{{{#!sql
     30INSERT INTO NOTIFICATION (content, is_read, created_at)
     31VALUES ('Elena published a new chapter of "The Chronicles of Eldoria"', FALSE, CURRENT_TIMESTAMP);
     32}}}
     33
     34**7.** The system confirms the chapter was added and displays it on the story page.