mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 15:37:23 +01:00
OneTime Invites Server handling (#17)
* add server-side handling for one time invites
This commit is contained in:
parent
c13e457780
commit
d83d9a6753
10 changed files with 1206 additions and 2 deletions
|
|
@ -42,6 +42,7 @@ public class MareDbContext : DbContext
|
|||
public DbSet<Group> Groups { get; set; }
|
||||
public DbSet<GroupPair> GroupPairs { get; set; }
|
||||
public DbSet<GroupBan> GroupBans { get; set; }
|
||||
public DbSet<GroupTempInvite> GroupTempInvites { get; set; }
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
|
|
@ -68,5 +69,9 @@ public class MareDbContext : DbContext
|
|||
modelBuilder.Entity<GroupBan>().HasKey(u => new { u.GroupGID, u.BannedUserUID });
|
||||
modelBuilder.Entity<GroupBan>().HasIndex(c => c.BannedUserUID);
|
||||
modelBuilder.Entity<GroupBan>().HasIndex(c => c.GroupGID);
|
||||
modelBuilder.Entity<GroupTempInvite>().ToTable("group_temp_invites");
|
||||
modelBuilder.Entity<GroupTempInvite>().HasKey(u => new { u.GroupGID, u.Invite });
|
||||
modelBuilder.Entity<GroupTempInvite>().HasIndex(c => c.GroupGID);
|
||||
modelBuilder.Entity<GroupTempInvite>().HasIndex(c => c.Invite);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue