mod_notes table
The mod_notes table in the Reddit Clone Database Schema schema has 9 columns, keyed by id, with 3 foreign keys to subreddits and users.
Private per-user notes a mod team keeps on someone, with an optional label that shows as a badge next to their name. This is the institutional memory that stops a team re-litigating the same person every six months, and it is deliberately invisible to the user.
Columns (9)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| subreddit_id | uuid | not null, references subreddits.id | |
| user_id | uuid | not null, references users.id | |
| moderator_id | uuid | not null, references users.id | |
| label | mod_note_label | ||
| note | varchar(1000) | not null | |
| content_type | content_type | ||
| content_id | uuid | ||
| created_at | timestamptz | not null |
Indexes (1)
(subreddit_id, user_id, created_at)
Relationships
mod_notes.subreddit_idreferencessubreddits.idmod_notes.user_idreferencesusers.idmod_notes.moderator_idreferencesusers.id