Comments


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 public.gen_random_uuid()
CommentImages.CommentId CommentImages_CommentId_fkey C
CommentNotifications.CommentId CommentNotifications_CommentId_fkey R
CommentShares.CommentId CommentShares_CommentId_fkey R
CommentUpvotes.CommentId CommentUpvotes_CommentId_fkey C

primary key

AnswerId uuid 2147483647 null
Answers.id Comments_AnswerId_fkey C

foreign key, reference to qn_ans.“Answers”

UserId uuid 2147483647 null
Users.id Comments_UserId_fkey R

foreign key, reference to public.“Users”

createdAt timestamptz 35,6 now()

created time

updatedAt timestamptz 35,6 now()

updated time

content text 2147483647 null

comment detail, we might store json string here, the reason why we don’t use jsonb is graphql is strong type, cannot return any

deletedAt timestamptz 35,6 null

Indexes

Constraint Name Type Sort Column(s)
Comments_pkey Primary key Asc id
qn_ans_Comments_AnswerId_idx Performance Asc AnswerId
qn_ans_Comments_createdAt_idx Performance Asc createdAt
qn_ans_Comments_UserId_idx Performance Asc UserId

Relationships