| | 1 | == Writer Creates a New Story |
| | 2 | |
| | 3 | === Authors: **Writer** |
| | 4 | writer creates a new story on the platform, setting its basic details, mature content flag, and initial status as draft. |
| | 5 | |
| | 6 | **1.** The writer navigates to the dashboard and selects "Create New Story". |
| | 7 | |
| | 8 | **2.** The system displays a form requesting title, short description, content, mature content flag, cover image, and genre selection. |
| | 9 | |
| | 10 | **3.** The writer fills in all the details and submits the form. |
| | 11 | |
| | 12 | **4.** The system inserts a new record into the STORY table. |
| | 13 | {{{#!sql |
| | 14 | INSERT INTO STORY (mature_content, short_description, image, content, user_id, created_at, updated_at) |
| | 15 | VALUES (FALSE, 'The Chronicles of Eldoria: When the last dragon awakens, a young mage must unite the fractured kingdoms', |
| | 16 | 'https://images.unsplash.com/photo-dragon-fantasy.jpg', |
| | 17 | 'In the ancient realm of Eldoria...', |
| | 18 | 2, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP); |
| | 19 | }}} |
| | 20 | |
| | 21 | **5.** The system sets the story status as draft by default. |
| | 22 | |
| | 23 | {{{#!sql |
| | 24 | INSERT INTO STATUS (story_id, status) |
| | 25 | VALUES (1, 'draft'); |
| | 26 | }}} |
| | 27 | |
| | 28 | **6.** The system assigns the selected genres to the story. |
| | 29 | {{{#!sql |
| | 30 | INSERT INTO HAS_GENRE (story_id, genre_id) VALUES |
| | 31 | (1, 1), |
| | 32 | (1, 4), |
| | 33 | (1, 6); |
| | 34 | }}} |
| | 35 | |
| | 36 | **7.** The system confirms the story was created and redirects the writer to the story management page. |