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
@@ -25,6 +25,12 @@ namespace MessageService.Infrastructure.Migrations
modelBuilder.Entity("MessageService.Domain.Entities.Conversation", b =>
{
b.Property<string>("ActiveConversationKey")
.ValueGeneratedOnAddOrUpdate()
.HasMaxLength(96)
.HasColumnType("varchar(96)")
.HasComputedColumnSql("CASE WHEN `IsDeleted` = 0 THEN CONCAT(`UserId`, ':', `ChatType`, ':', `TargetId`) ELSE NULL END", true);
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
@@ -45,6 +51,9 @@ namespace MessageService.Infrastructure.Migrations
.IsRequired()
.HasColumnType("longtext");
b.Property<DateTimeOffset?>("LastMessageTime")
.HasColumnType("datetime(6)");
b.Property<long?>("LastReadSequenceId")
.HasColumnType("bigint");
@@ -74,8 +83,14 @@ namespace MessageService.Infrastructure.Migrations
b.HasKey("Id");
b.HasIndex("ActiveConversationKey")
.IsUnique()
.HasDatabaseName("UX_conversations_ActiveConversationKey");
b.HasIndex("UserId");
b.HasIndex("UserId", "ChatType", "TargetId", "IsDeleted");
b.ToTable("conversations", (string)null);
});
@@ -176,6 +191,8 @@ namespace MessageService.Infrastructure.Migrations
b.HasIndex("StreamKey", "SequenceId");
b.HasIndex("StreamKey", "MsgType", "State", "SequenceId");
b.ToTable("messages", (string)null);
});
#pragma warning restore 612, 618