ThreadReplies table
The ThreadReplies table in the Shipfolio schema has 9 columns, keyed by Id, with 3 foreign keys to Threads, ThreadReplies and AspNetUsers. 2 columns in ReplyVotes and ThreadReports reference it.
Columns (9)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key | |
| ThreadId | uuid | not null, references Threads.Id | |
| ParentReplyId | uuid | references ThreadReplies.Id | |
| AuthorId | uuid | not null, references AspNetUsers.Id | |
| Body | varchar(10000) | not null | |
| Score | integer | not null | |
| CreatedAt | timestamptz | not null | |
| DeletedAt | timestamptz | ||
| DeletedBy | uuid |
Indexes (3)
(AuthorId, CreatedAt)(IX_ThreadReplies_AuthorId_CreatedAt)(ParentReplyId)(IX_ThreadReplies_ParentReplyId)(ThreadId, CreatedAt)(IX_ThreadReplies_ThreadId_CreatedAt)
Relationships
ThreadReplies.ThreadIdreferencesThreads.IdThreadReplies.ParentReplyIdreferencesThreadReplies.IdThreadReplies.AuthorIdreferencesAspNetUsers.IdReplyVotes.ReplyIdreferencesThreadRepliesThreadReports.ReplyIdreferencesThreadReplies