We're working on a PM system where a user can send an email to other users or groups.
We currently have the following tables:
Users can be part of many groups. A user doesn't have to be part of any group.
The problem I am having is with managing recipients and inboxes. Groups don't have inboxes - users do. An inbox stores information like whether or not the recipient has read the message, marked it for follow up, deleted it, etc.
So I made two tables:
recipients just stores the thread id, recipient id, and whether or not the recipient is a group or not.
recipients_inbox has the users who this message was sent to - whether as part of a group or individually. It stores: thread id, recipient id, when the thread was last read, flagged, etc.
My question is: Does it make sense to keep the recipients and recipients_inbox table separate? Should I just combine them and where the recipient is a group leave user-fields such as lastRead and flagged as null?