rebus-ink / ink-API

Hobb API Server: backend for the Rebus Reader system
GNU Affero General Public License v3.0
4 stars 5 forks source link

added collaborator table and model #644

Closed Marie000 closed 3 years ago

Marie000 commented 3 years ago

Created the collaborator table: Collaborator object:

id: <string>
readerId: <string>
notebookId: <string>
permission: <object, with properties like {read: true, comment: true...}>
status: <string, but stored as an integer. Can be 'pending', 'accepted', 'refused', etc>
published: <timestamp>
updated: <timestamp>
deleted: <timestamp>

readerId, notebookId, permission and status are required Initialll I was going to have a 'role' field to differentiate between owner and collaborator, but we don't need to store the owner here since it is the person who created the notebook. So unless we want people to eventually be able to change ownership of a notebook, we don't need it here. Other information can be stored in the permission object.

Makes sense?