I have a message model and I want it to have several receivers, possibly a lot of them. I would also like to be able to tell for each receiver if the message was viewed or not (read/unread). Also I would like a receiver to be able to delete the message.
两种可能的解决方案如下,因为每个我都有一个宣传模式,即用户模式。
- For the second: I have a MessageReceiver for each receiver it has links to message and to user and also stores the state (read/unread).
Which of this two approached do you consider that it has a better performance? And in the case of the first do you have any suggestion on handling the status of the message.