| 26 | | INSERT INTO COLLABORATION (user_id, story_id, created_at) |
| 27 | | VALUES (9, 5, CURRENT_TIMESTAMP); |
| | 23 | INSERT INTO COLLABORATION (user_id, story_id, role, permission_level, collab_created_at) |
| | 24 | VALUES (9, 5, 'co-author', 4, CURRENT_TIMESTAMP); |
| | 25 | }}} |
| | 26 | **6.** The system sends a notification to the invited writer informing them of the collaboration. |
| | 27 | {{{#!sql |
| | 28 | INSERT INTO NOTIFICATION (notification_content, content_type, is_read, user_id, story_id, notification_created_at) |
| | 29 | VALUES ('You have been invited to collaborate on "Letters from Constantinople"', 'collaboration_invite', FALSE, 9, 5, CURRENT_TIMESTAMP); |
| 30 | | **6.** The system assigns the role to the collaborator. |
| 31 | | |
| 32 | | {{{#!sql |
| 33 | | INSERT INTO ROLES (user_id, story_id, roles) |
| 34 | | VALUES (9, 5, 'co-author'); |
| 35 | | }}} |
| 36 | | |
| 37 | | **7.** The system assigns the permission level to the collaborator. |
| 38 | | |
| 39 | | {{{#!sql |
| 40 | | INSERT INTO PERMISSION_LEVEL (user_id, story_id, permission_level) |
| 41 | | VALUES (9, 5, 4); |
| 42 | | }}} |
| 43 | | |
| 44 | | **8.**The system sends a notification to the invited writer informing them of the collaboration. |
| 45 | | {{{#!sql |
| 46 | | INSERT INTO NOTIFICATION (content, is_read, created_at) |
| 47 | | VALUES ('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 | | |
| | 32 | **7.** The system confirms the collaborator was successfully added. |