fix: align backend APIs and upload flow
This commit is contained in:
@@ -11,6 +11,15 @@ namespace MessageService.Infrastructure.Configs
|
||||
builder.ToTable("conversations");
|
||||
builder.HasKey(x => x.Id);
|
||||
builder.HasIndex(x => x.UserId);
|
||||
builder.HasIndex(x => new { x.UserId, x.ChatType, x.TargetId, x.IsDeleted });
|
||||
builder.Property<string>("ActiveConversationKey")
|
||||
.HasMaxLength(96)
|
||||
.HasComputedColumnSql(
|
||||
"CASE WHEN `IsDeleted` = 0 THEN CONCAT(`UserId`, ':', `ChatType`, ':', `TargetId`) ELSE NULL END",
|
||||
stored: true);
|
||||
builder.HasIndex("ActiveConversationKey")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("UX_conversations_ActiveConversationKey");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user