Queue chat bulk actions through SQL outbox
This commit is contained in:
@@ -19,6 +19,8 @@ public sealed class QMaxDbContext(DbContextOptions<QMaxDbContext> options) : DbC
|
||||
modelBuilder.Entity<User>().HasIndex(x => x.PhoneNumber);
|
||||
modelBuilder.Entity<UserSession>().HasIndex(x => x.RefreshTokenHash).IsUnique();
|
||||
modelBuilder.Entity<Chat>().HasIndex(x => x.ExternalId).IsUnique();
|
||||
modelBuilder.Entity<Chat>().HasIndex(x => x.DeletedAt);
|
||||
modelBuilder.Entity<Chat>().HasIndex(x => new { x.PendingMaxAction, x.PendingMaxActionRequestedAt });
|
||||
modelBuilder.Entity<Message>().HasIndex(x => new { x.ChatId, x.SentAt });
|
||||
modelBuilder.Entity<Message>().HasIndex(x => x.ExternalId);
|
||||
modelBuilder.Entity<MessageAttachment>().HasIndex(x => x.StorageFileName).IsUnique();
|
||||
@@ -30,6 +32,10 @@ public sealed class QMaxDbContext(DbContextOptions<QMaxDbContext> options) : DbC
|
||||
.Property(x => x.Kind)
|
||||
.HasConversion<string>();
|
||||
|
||||
modelBuilder.Entity<Chat>()
|
||||
.Property(x => x.PendingMaxAction)
|
||||
.HasConversion<string>();
|
||||
|
||||
modelBuilder.Entity<Message>()
|
||||
.Property(x => x.Direction)
|
||||
.HasConversion<string>();
|
||||
|
||||
Reference in New Issue
Block a user