Add forwarding, friend controls, and benefits

Add message forwarding and reply lookup, friend removal and blocking endpoints, and database-backed Govor+ privileges with customizable profile tags. Include migrations, integration tests, and updated API and operations documentation.
This commit is contained in:
Artemy
2026-10-31 18:29:40 +07:00
parent a3401ceedf
commit 632ac04b56
78 changed files with 5284 additions and 720 deletions
+8
View File
@@ -11,6 +11,7 @@ namespace Govor.Domain;
public class GovorDbContext(DbContextOptions<GovorDbContext> options) : DbContext(options)
{
public virtual DbSet<User> Users { get; set; }
public DbSet<UserBenefits> UserBenefits { get; set; }
public virtual DbSet<UserSession> UserSessions { get; set; }
public virtual DbSet<UserPushToken> UserPushTokens { get; set; }
public virtual DbSet<UserCryptoSession> UserCryptoSessions { get; set; }
@@ -43,6 +44,13 @@ public class GovorDbContext(DbContextOptions<GovorDbContext> options) : DbContex
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<UserBenefits>(b =>
{
b.HasKey(x => x.UserId);
b.Property(x => x.Revision).IsConcurrencyToken();
b.Property(x => x.TagJson).HasMaxLength(4000);
b.HasOne<User>().WithOne().HasForeignKey<UserBenefits>(x => x.UserId).OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity<E2eeIdentityChange>(b =>
{
b.HasKey(c => new { c.UserId, c.Epoch });