fix: align backend APIs and upload flow
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user