ReportedUsers


Description

This table contains list of users who got reported by other users

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 gen_random_uuid()
ReportNotifications.ReportId ReportNotifications_ReportId_fkey C

Primary Key

UserId uuid 2147483647 null
Users.id ReportedUsers_UserId_fkey C

Foreign Key to Users table

ReportReasonId uuid 2147483647 null
ReportUserReasons.id ReportedUsers_ReportReasonId_fkey C

Foreign Key to ReportUserReasons table

reason text 2147483647 null

contains reason if the report reason is unspecified

ContentId uuid 2147483647 null
Contents.id ReportedUsers_ContentId_fkey C

Foreign Key to Contents table

createdAt timestamptz 35,6 now()
updatedAt timestamptz 35,6 now()
ReporterUserId uuid 2147483647 null
Users.id ReportedUsers_ReporterUserId_fkey C
contentReviewStatus "gcud"."enum_Reported_content_review_status" 2147483647 null

Content review status, A reported content with no status means it is awaiting review.

Indexes

Constraint Name Type Sort Column(s)
ReportedUsers_pkey Primary key Asc id
ReportedUsers_ContentId_UserId_ReporterUserId_key Must be unique Asc/Asc/Asc ContentId + UserId + ReporterUserId
ReportedUsers_contentReviewStatus_idx Performance Asc contentReviewStatus
ReportedUsers_UserId_ReporterUserId_key Must be unique Asc/Asc UserId + ReporterUserId

Check Constraints

Constraint Name Constraint
UserId_ReporterUserId_check (("UserId" <> "ReporterUserId"))

Relationships