Create comprehensive/crud methods for our db that allow us to update UI on transactions automatically #31
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Currently, only 5 of our DB models are even partially covered in terms of CRUD methods (create, read, update, delete). We should create files for each of our models, using
prisma/schema.prisma
as a reference for how we need to handle the incoming/outgoing data and it's relationships.We need to standardize these methods and usages across the board, and preserve as much of prisma's ORM functionality as we can. Working out the relation and unique constraints might be challenging given various possible race conditions from this next part...
We need to introduce our websocket to our DB methods. Updating UI elements (compiling
.pug
templates at the component level and emitting via ws) will be infinitely more streamlined by letting our model files handle the UI updates.Ie:
DiscordMessage.create(.......);
results in a new message appearing in the client, facilitated by HTMX and Websockets.The text was updated successfully, but these errors were encountered: