Changes between Initial Version and Version 1 of WrittersCollaboration


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

--

Legend:

Unmodified
Added
Removed
Modified
  • WrittersCollaboration

    v1 v1  
     1== Writer Invites a Collaborator to a Story
     2
     3=== Authors: **Writter**
     4A writer invites another writer to collaborate on their story, assigning them a role and permission level within the collaboration.
     5
     6**1.** The writer navigates to their story management page and selects "Manage Collaborators".
     7
     8**2.** The system displays the current list of collaborators on the story.
     9
     10{{{#!sql
     11SELECT u.username, u.name, u.surname, r.roles, p.permission_level
     12FROM COLLABORATION c
     13JOIN USERS u ON c.user_id = u.user_id
     14JOIN ROLES r ON c.user_id = r.user_id AND c.story_id = r.story_id
     15JOIN PERMISSION_LEVEL p ON c.user_id = p.user_id AND c.story_id = p.story_id
     16WHERE c.story_id = 5;
     17}}}
     18
     19**3.** The writer searches for another writer by username and selects them.
     20
     21**4.** The writer assigns a role and permission level to the new collaborator.
     22
     23**5.**  TThe system inserts the new collaborator into the COLLABORATION table.
     24
     25{{{#!sql
     26INSERT INTO COLLABORATION (user_id, story_id, created_at)
     27VALUES (9, 5, CURRENT_TIMESTAMP);
     28}}}
     29
     30**6.** The system assigns the role to the collaborator.
     31
     32{{{#!sql
     33INSERT INTO ROLES (user_id, story_id, roles)
     34VALUES (9, 5, 'co-author');
     35}}}
     36
     37**7.** The system assigns the permission level to the collaborator.
     38
     39{{{#!sql
     40INSERT INTO PERMISSION_LEVEL (user_id, story_id, permission_level)
     41VALUES (9, 5, 4);
     42}}}
     43
     44**8.**The system sends a notification to the invited writer informing them of the collaboration.
     45{{{#!sql
     46INSERT INTO NOTIFICATION (content, is_read, created_at)
     47VALUES ('You have been invited to collaborate on "Letters from Constantinople"', FALSE, CURRENT_TIMESTAMP);
     48}}}
     49**9.** The system confirms the collaborator was successfully added.
     50