modmail_messages table
The modmail_messages table in the Reddit Clone Database Schema schema has 7 columns, keyed by id, with 2 foreign keys to modmail_conversations and users.
is_private_note is a mod-only annotation inside an otherwise visible thread, and is_author_hidden is how a team replies as the subreddit rather than as a named person. Both are visibility rules that must live on the message, not the conversation.
Columns (7)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| conversation_id | uuid | not null, references modmail_conversations.id | |
| author_id | uuid | references users.id | |
| body_md | text | not null | |
| is_private_note | boolean | not null | |
| is_author_hidden | boolean | not null | |
| created_at | timestamptz | not null |
Indexes (1)
(conversation_id, created_at)
Relationships
modmail_messages.conversation_idreferencesmodmail_conversations.idmodmail_messages.author_idreferencesusers.id