Conversations table
The Conversations table in the Shipfolio schema has 14 columns, keyed by Id, with 3 foreign keys to AspNetUsers and Listings. 4 columns in Deals, MessageReports, Messages and WelcomeMessages reference it.
Columns (14)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key | |
| StarterId | uuid | not null, references AspNetUsers.Id | |
| RecipientId | uuid | not null, references AspNetUsers.Id | |
| ListingId | uuid | references Listings.Id | |
| LastMessageAt | timestamptz | not null | |
| StarterReadAt | timestamptz | ||
| RecipientReadAt | timestamptz | ||
| ClosedAt | timestamptz | ||
| ClosedBy | uuid | ||
| CreatedAt | timestamptz | not null | |
| UpdatedAt | timestamptz | not null | |
| Kind | varchar(50) | not null | |
| RecipientFavoritedAt | timestamptz | ||
| StarterFavoritedAt | timestamptz |
Indexes (4)
(ListingId)(IX_Conversations_ListingId)(RecipientId, LastMessageAt)(IX_Conversations_RecipientId_LastMessageAt)(StarterId, LastMessageAt)(IX_Conversations_StarterId_LastMessageAt)(StarterId, RecipientId, ListingId)(IX_Conversations_StarterId_RecipientId_ListingId)
Relationships
Conversations.StarterIdreferencesAspNetUsers.IdConversations.RecipientIdreferencesAspNetUsers.IdConversations.ListingIdreferencesListings.IdDeals.ConversationIdreferencesConversationsMessageReports.ConversationIdreferencesConversationsMessages.ConversationIdreferencesConversationsWelcomeMessages.ConversationIdreferencesConversations