Create module table in the database
ixahmedxi opened this issue · comments
The first step into getting the modules functionality in Noodle is to create an appropriate module table in the database. I'm thinking a module would be kind of the big wrapper around other functionlities like tasks, assignments, notebooks, flashcards...etc
So the module table will host the relations to the other tables basically.
The way we will link a module to a user (or an organisation) is by the userId
or the orgId
from Clerk if that's available (orgId takes precedence).
Columns that we should have on a module:
-
Id (unique UUID)
-
userId (optional, because it can be null in the instance that the module belongs to an organisation)
-
orgId (optional, because it can be null in the instance that the module belongs to a user)
-
Name of the module
-
Icon (optional, default to
graduation-cap
string which we will match to lucide icons) -
Colour (optional, default to the noodle
primary
colour which we will match to tailwind colors) -
Description (optional)
-
Module code (for example: CS3421)
-
Credits
-
lastVisited
-
createdAt
Things that will be linked to a module (issues will be created for each respective table)
- Notebooks
- Contacts
- Tasks
- Assignments
- Flashcards