Answer the question
In order to leave comments, you need to log in
How to properly organize the data model?
There is a model: Room - it has an array of messages and an array of participants. It is necessary that the room has a field with the number of new messages for each user.
How can this be properly organized?
While there is an idea, to associate each message with a participant and mark whether the participant read the message or not? But there will be too many connections. Maybe someone has already solved a similar problem and will tell you the best solution?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question