reports table
The reports table in the Forum Database Schema schema has 9 columns, keyed by id, with 4 foreign keys to users, posts and topics. 1 column in moderation_actions references it.
Exactly one of the three target columns is set, enforced by a check constraint. The status index is the moderation queue.
Columns (9)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| reporter_id | uuid | not null, references users.id | |
| post_id | uuid | references posts.id | |
| topic_id | uuid | references topics.id | |
| reported_user_id | uuid | references users.id | |
| reason | report_reason | not null | |
| details | varchar(1000) | ||
| status | report_status | not null | |
| created_at | timestamptz | not null |
Indexes (2)
(status, created_at)(reported_user_id)
Relationships
reports.reporter_idreferencesusers.idreports.post_idreferencesposts.idreports.topic_idreferencestopics.idreports.reported_user_idreferencesusers.idmoderation_actions.report_idreferencesreports