fix: align backend APIs and upload flow

This commit is contained in:
2026-09-15 14:10:55 +08:00
parent 32177a7293
commit 53e6195938
149 changed files with 4791 additions and 435 deletions
@@ -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");
}
}