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.
Created the collaborator table: Collaborator object:
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?