Syncshells (#11)

* some groups stuff

* further groups rework

* fixes for pause changes

* adjsut timeout interval

* fixes and namespace change to file scoped

* more fixes

* further implement groups

* fix change group ownership

* add some more stuff for groups

* more fixes and additions

* some fixes based on analyzers, add shard info to ui

* add discord command, cleanup

* fix regex

* add group migration and deletion on user deletion

* add api method for client to check health of connection

* adjust regex for vanity

* fixes for server and bot

* fixes some string comparison in linq queries

* fixes group leave and sets alias to null

* fix syntax in changeownership

* add better logging, fixes for group leaving

* fixes for group leave

Co-authored-by: Stanley Dimant <root.darkarchon@outlook.com>
This commit is contained in:
rootdarkarchon
2022-10-04 14:13:43 +02:00
committed by GitHub
parent d866223069
commit bff21ead95
57 changed files with 3761 additions and 1239 deletions

View File

@@ -39,13 +39,14 @@ public class MareDbContext : DbContext
public DbSet<Auth> Auth { get; set; }
public DbSet<LodeStoneAuth> LodeStoneAuth { get; set; }
public DbSet<BannedRegistrations> BannedRegistrations { get; set; }
public DbSet<Group> Groups { get; set; }
public DbSet<GroupPair> GroupPairs { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Auth>().ToTable("auth");
modelBuilder.Entity<User>().ToTable("users");
//modelBuilder.Entity<User>().HasIndex(c => c.CharacterIdentification);
modelBuilder.Entity<FileCache>().ToTable("file_caches");
modelBuilder.Entity<FileCache>().HasIndex(c => c.UploaderUID);
modelBuilder.Entity<ClientPair>().ToTable("client_pairs");
@@ -56,5 +57,11 @@ public class MareDbContext : DbContext
modelBuilder.Entity<Banned>().ToTable("banned_users");
modelBuilder.Entity<LodeStoneAuth>().ToTable("lodestone_auth");
modelBuilder.Entity<BannedRegistrations>().ToTable("banned_registrations");
modelBuilder.Entity<Group>().ToTable("groups");
modelBuilder.Entity<Group>().HasIndex(c => c.OwnerUID);
modelBuilder.Entity<GroupPair>().ToTable("group_pairs");
modelBuilder.Entity<GroupPair>().HasKey(u => new { u.GroupGID, u.GroupUserUID });
modelBuilder.Entity<GroupPair>().HasIndex(c => c.GroupUserUID);
modelBuilder.Entity<GroupPair>().HasIndex(c => c.GroupGID);
}
}