Revert "Merge pull request 'revert ce9b94a534c1239b4b89c4ccf05354c477da49d9' (#44) from defnotken-patch-1 into master"

This reverts commit 76bdbe28da, reversing
changes made to ce9b94a534.
This commit is contained in:
defnotken
2025-12-21 21:00:53 -06:00
parent 3350f2ebf6
commit ec26abaeb5
6 changed files with 105 additions and 9 deletions

View File

@@ -80,6 +80,9 @@ public class LightlessDbContext : DbContext
.WithOne(p => p.Group)
.HasForeignKey<GroupProfile>(p => p.GroupGID)
.IsRequired(false);
mb.Entity<Group>()
.Property(g => g.ChatEnabled)
.HasDefaultValue(true);
mb.Entity<GroupPair>().ToTable("group_pairs");
mb.Entity<GroupPair>().HasKey(u => new { u.GroupGID, u.GroupUserUID });
mb.Entity<GroupPair>().HasIndex(c => c.GroupUserUID);

View File

@@ -474,6 +474,11 @@ namespace LightlessSyncServer.Migrations
.HasColumnType("boolean")
.HasColumnName("prefer_disable_vfx");
b.Property<bool>("ChatEnabled")
.HasColumnType("boolean")
.HasColumnName("chat_enabled")
.HasDefaultValue(true);
b.HasKey("GID")
.HasName("pk_groups");

View File

@@ -19,5 +19,6 @@ public class Group
public bool PreferDisableSounds { get; set; }
public bool PreferDisableAnimations { get; set; }
public bool PreferDisableVFX { get; set; }
public bool ChatEnabled { get; set; } = true;
public DateTime CreatedDate { get; set; } = DateTime.UtcNow;
}