Wednesday 15 August 2018

DB design for reactions like Discord or Facebook

I'm trying to design a mongodb schema for reactions like Discord or Facebook. I want to have it so users can react to items with emojis, but they can only react once. I'm having a hard time wrapping my head around it. I want to get all the reactions for a specific Item or User, but also want a count of each type of reaction. Smile, heart, angry, etc. What is the best way to set this up? Or what type of relationship would this be?

Submitted August 15, 2018 at 08:25PM by soaringradio

No comments:

Post a Comment