From 6352f51b98ce4bf2494e92ebe29ffea24dfba06d Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 23 Jun 2024 17:33:54 +0200 Subject: [PATCH] Ban template system (#29365) To help out admins, so they can easily fill out datacenter bans and stuff. Supports ban exemption flags and everything. This is for use with SS14.Admin so it's just DB models here. --- .../20240623005121_BanTemplate.Designer.cs | 279 ++++++++++++------ .../20240623005113_BanTemplate.Designer.cs | 267 ++++++++++++----- Content.Server.Database/Model.cs | 1 + 3 files changed, 385 insertions(+), 162 deletions(-) diff --git a/Content.Server.Database/Migrations/Postgres/20240623005121_BanTemplate.Designer.cs b/Content.Server.Database/Migrations/Postgres/20240623005121_BanTemplate.Designer.cs index 2fb55ddfec85..5d89f3dd29b3 100644 --- a/Content.Server.Database/Migrations/Postgres/20240623005121_BanTemplate.Designer.cs +++ b/Content.Server.Database/Migrations/Postgres/20240623005121_BanTemplate.Designer.cs @@ -15,7 +15,7 @@ namespace Content.Server.Database.Migrations.Postgres { [DbContext(typeof(PostgresServerDbContext))] - [Migration("20240623005113_BanTemplate")] + [Migration("20240623005121_BanTemplate")] partial class BanTemplate { /// @@ -186,6 +186,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("uuid") .HasColumnName("deleted_by_id"); + b.Property("Dismissed") + .HasColumnType("boolean") + .HasColumnName("dismissed"); + b.Property("ExpirationTime") .HasColumnType("timestamp with time zone") .HasColumnName("expiration_time"); @@ -235,7 +239,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("RoundId") .HasDatabaseName("IX_admin_messages_round_id"); - b.ToTable("admin_messages", (string)null); + b.ToTable("admin_messages", null, t => + { + t.HasCheckConstraint("NotDismissedAndSeen", "NOT dismissed OR seen"); + }); }); modelBuilder.Entity("Content.Server.Database.AdminNote", b => @@ -509,49 +516,49 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) }); modelBuilder.Entity("Content.Server.Database.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("ban_template_id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("ban_template_id"); - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("AutoDelete") - .HasColumnType("boolean") - .HasColumnName("auto_delete"); + b.Property("AutoDelete") + .HasColumnType("boolean") + .HasColumnName("auto_delete"); - b.Property("ExemptFlags") - .HasColumnType("integer") - .HasColumnName("exempt_flags"); + b.Property("ExemptFlags") + .HasColumnType("integer") + .HasColumnName("exempt_flags"); - b.Property("Hidden") - .HasColumnType("boolean") - .HasColumnName("hidden"); + b.Property("Hidden") + .HasColumnType("boolean") + .HasColumnName("hidden"); - b.Property("Length") - .HasColumnType("interval") - .HasColumnName("length"); + b.Property("Length") + .HasColumnType("interval") + .HasColumnName("length"); - b.Property("Reason") - .IsRequired() - .HasColumnType("text") - .HasColumnName("reason"); + b.Property("Reason") + .IsRequired() + .HasColumnType("text") + .HasColumnName("reason"); - b.Property("Severity") - .HasColumnType("integer") - .HasColumnName("severity"); + b.Property("Severity") + .HasColumnType("integer") + .HasColumnName("severity"); - b.Property("Title") - .IsRequired() - .HasColumnType("text") - .HasColumnName("title"); + b.Property("Title") + .IsRequired() + .HasColumnType("text") + .HasColumnName("title"); - b.HasKey("Id") - .HasName("PK_ban_template"); + b.HasKey("Id") + .HasName("PK_ban_template"); - b.ToTable("ban_template", (string)null); - }); + b.ToTable("ban_template", (string)null); + }); modelBuilder.Entity("Content.Server.Database.ConnectionLog", b => { @@ -600,6 +607,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("ServerId") .HasDatabaseName("IX_connection_log_server_id"); + b.HasIndex("Time"); + b.HasIndex("UserId"); b.ToTable("connection_log", null, t => @@ -645,33 +654,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("job", (string)null); }); - modelBuilder.Entity("Content.Server.Database.Loadout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer") - .HasColumnName("loadout_id"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("LoadoutName") - .IsRequired() - .HasColumnType("text") - .HasColumnName("loadout_name"); - - b.Property("ProfileId") - .HasColumnType("integer") - .HasColumnName("profile_id"); - - b.HasKey("Id") - .HasName("PK_loadout"); - - b.HasIndex("ProfileId", "LoadoutName") - .IsUnique(); - - b.ToTable("loadout", (string)null); - }); - modelBuilder.Entity("Content.Server.Database.PlayTime", b => { b.Property("Id") @@ -803,21 +785,11 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("age"); - b.Property("Backpack") - .IsRequired() - .HasColumnType("text") - .HasColumnName("backpack"); - b.Property("CharacterName") .IsRequired() .HasColumnType("text") .HasColumnName("char_name"); - b.Property("Clothing") - .IsRequired() - .HasColumnType("text") - .HasColumnName("clothing"); - b.Property("EyeColor") .IsRequired() .HasColumnType("text") @@ -900,6 +872,100 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("profile", (string)null); }); + modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("profile_loadout_id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("LoadoutName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("loadout_name"); + + b.Property("ProfileLoadoutGroupId") + .HasColumnType("integer") + .HasColumnName("profile_loadout_group_id"); + + b.HasKey("Id") + .HasName("PK_profile_loadout"); + + b.HasIndex("ProfileLoadoutGroupId"); + + b.ToTable("profile_loadout", (string)null); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("profile_loadout_group_id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("GroupName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("group_name"); + + b.Property("ProfileRoleLoadoutId") + .HasColumnType("integer") + .HasColumnName("profile_role_loadout_id"); + + b.HasKey("Id") + .HasName("PK_profile_loadout_group"); + + b.HasIndex("ProfileRoleLoadoutId"); + + b.ToTable("profile_loadout_group", (string)null); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("profile_role_loadout_id"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ProfileId") + .HasColumnType("integer") + .HasColumnName("profile_id"); + + b.Property("RoleName") + .IsRequired() + .HasColumnType("text") + .HasColumnName("role_name"); + + b.HasKey("Id") + .HasName("PK_profile_role_loadout"); + + b.HasIndex("ProfileId"); + + b.ToTable("profile_role_loadout", (string)null); + }); + + modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b => + { + b.Property("PlayerUserId") + .HasColumnType("uuid") + .HasColumnName("player_user_id"); + + b.Property("RoleId") + .HasColumnType("text") + .HasColumnName("role_id"); + + b.HasKey("PlayerUserId", "RoleId") + .HasName("PK_role_whitelists"); + + b.ToTable("role_whitelists", (string)null); + }); + modelBuilder.Entity("Content.Server.Database.Round", b => { b.Property("Id") @@ -913,10 +979,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("integer") .HasColumnName("server_id"); - b.Property("StartDate") - .ValueGeneratedOnAdd() + b.Property("StartDate") .HasColumnType("timestamp with time zone") - .HasDefaultValue(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)) .HasColumnName("start_date"); b.HasKey("Id") @@ -1577,28 +1641,65 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("Profile"); }); - modelBuilder.Entity("Content.Server.Database.Loadout", b => + modelBuilder.Entity("Content.Server.Database.Profile", b => + { + b.HasOne("Content.Server.Database.Preference", "Preference") + .WithMany("Profiles") + .HasForeignKey("PreferenceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_profile_preference_preference_id"); + + b.Navigation("Preference"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b => + { + b.HasOne("Content.Server.Database.ProfileLoadoutGroup", "ProfileLoadoutGroup") + .WithMany("Loadouts") + .HasForeignKey("ProfileLoadoutGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_profile_loadout_profile_loadout_group_profile_loadout_group~"); + + b.Navigation("ProfileLoadoutGroup"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b => + { + b.HasOne("Content.Server.Database.ProfileRoleLoadout", "ProfileRoleLoadout") + .WithMany("Groups") + .HasForeignKey("ProfileRoleLoadoutId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_profile_loadout_group_profile_role_loadout_profile_role_loa~"); + + b.Navigation("ProfileRoleLoadout"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b => { b.HasOne("Content.Server.Database.Profile", "Profile") .WithMany("Loadouts") .HasForeignKey("ProfileId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("FK_loadout_profile_profile_id"); + .HasConstraintName("FK_profile_role_loadout_profile_profile_id"); b.Navigation("Profile"); }); - modelBuilder.Entity("Content.Server.Database.Profile", b => + modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b => { - b.HasOne("Content.Server.Database.Preference", "Preference") - .WithMany("Profiles") - .HasForeignKey("PreferenceId") + b.HasOne("Content.Server.Database.Player", "Player") + .WithMany("JobWhitelists") + .HasForeignKey("PlayerUserId") + .HasPrincipalKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("FK_profile_preference_preference_id"); + .HasConstraintName("FK_role_whitelists_player_player_user_id"); - b.Navigation("Preference"); + b.Navigation("Player"); }); modelBuilder.Entity("Content.Server.Database.Round", b => @@ -1800,6 +1901,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("AdminWatchlistsLastEdited"); b.Navigation("AdminWatchlistsReceived"); + + b.Navigation("JobWhitelists"); }); modelBuilder.Entity("Content.Server.Database.Preference", b => @@ -1818,6 +1921,16 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("Traits"); }); + modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b => + { + b.Navigation("Loadouts"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b => + { + b.Navigation("Groups"); + }); + modelBuilder.Entity("Content.Server.Database.Round", b => { b.Navigation("AdminLogs"); diff --git a/Content.Server.Database/Migrations/Sqlite/20240623005113_BanTemplate.Designer.cs b/Content.Server.Database/Migrations/Sqlite/20240623005113_BanTemplate.Designer.cs index 0bf74f84a70f..acce21c2bd92 100644 --- a/Content.Server.Database/Migrations/Sqlite/20240623005113_BanTemplate.Designer.cs +++ b/Content.Server.Database/Migrations/Sqlite/20240623005113_BanTemplate.Designer.cs @@ -169,6 +169,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("TEXT") .HasColumnName("deleted_by_id"); + b.Property("Dismissed") + .HasColumnType("INTEGER") + .HasColumnName("dismissed"); + b.Property("ExpirationTime") .HasColumnType("TEXT") .HasColumnName("expiration_time"); @@ -218,7 +222,10 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("RoundId") .HasDatabaseName("IX_admin_messages_round_id"); - b.ToTable("admin_messages", (string)null); + b.ToTable("admin_messages", null, t => + { + t.HasCheckConstraint("NotDismissedAndSeen", "NOT dismissed OR seen"); + }); }); modelBuilder.Entity("Content.Server.Database.AdminNote", b => @@ -480,47 +487,47 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) }); modelBuilder.Entity("Content.Server.Database.BanTemplate", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasColumnName("ban_template_id"); + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasColumnName("ban_template_id"); - b.Property("AutoDelete") - .HasColumnType("INTEGER") - .HasColumnName("auto_delete"); + b.Property("AutoDelete") + .HasColumnType("INTEGER") + .HasColumnName("auto_delete"); - b.Property("ExemptFlags") - .HasColumnType("INTEGER") - .HasColumnName("exempt_flags"); + b.Property("ExemptFlags") + .HasColumnType("INTEGER") + .HasColumnName("exempt_flags"); - b.Property("Hidden") - .HasColumnType("INTEGER") - .HasColumnName("hidden"); + b.Property("Hidden") + .HasColumnType("INTEGER") + .HasColumnName("hidden"); - b.Property("Length") - .HasColumnType("TEXT") - .HasColumnName("length"); + b.Property("Length") + .HasColumnType("TEXT") + .HasColumnName("length"); - b.Property("Reason") - .IsRequired() - .HasColumnType("TEXT") - .HasColumnName("reason"); + b.Property("Reason") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("reason"); - b.Property("Severity") - .HasColumnType("INTEGER") - .HasColumnName("severity"); + b.Property("Severity") + .HasColumnType("INTEGER") + .HasColumnName("severity"); - b.Property("Title") - .IsRequired() - .HasColumnType("TEXT") - .HasColumnName("title"); + b.Property("Title") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("title"); - b.HasKey("Id") - .HasName("PK_ban_template"); + b.HasKey("Id") + .HasName("PK_ban_template"); - b.ToTable("ban_template", (string)null); - }); + b.ToTable("ban_template", (string)null); + }); modelBuilder.Entity("Content.Server.Database.ConnectionLog", b => { @@ -567,6 +574,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.HasIndex("ServerId") .HasDatabaseName("IX_connection_log_server_id"); + b.HasIndex("Time"); + b.HasIndex("UserId"); b.ToTable("connection_log", (string)null); @@ -607,31 +616,6 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("job", (string)null); }); - modelBuilder.Entity("Content.Server.Database.Loadout", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER") - .HasColumnName("loadout_id"); - - b.Property("LoadoutName") - .IsRequired() - .HasColumnType("TEXT") - .HasColumnName("loadout_name"); - - b.Property("ProfileId") - .HasColumnType("INTEGER") - .HasColumnName("profile_id"); - - b.HasKey("Id") - .HasName("PK_loadout"); - - b.HasIndex("ProfileId", "LoadoutName") - .IsUnique(); - - b.ToTable("loadout", (string)null); - }); - modelBuilder.Entity("Content.Server.Database.PlayTime", b => { b.Property("Id") @@ -752,21 +736,11 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER") .HasColumnName("age"); - b.Property("Backpack") - .IsRequired() - .HasColumnType("TEXT") - .HasColumnName("backpack"); - b.Property("CharacterName") .IsRequired() .HasColumnType("TEXT") .HasColumnName("char_name"); - b.Property("Clothing") - .IsRequired() - .HasColumnType("TEXT") - .HasColumnName("clothing"); - b.Property("EyeColor") .IsRequired() .HasColumnType("TEXT") @@ -849,6 +823,94 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.ToTable("profile", (string)null); }); + modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasColumnName("profile_loadout_id"); + + b.Property("LoadoutName") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("loadout_name"); + + b.Property("ProfileLoadoutGroupId") + .HasColumnType("INTEGER") + .HasColumnName("profile_loadout_group_id"); + + b.HasKey("Id") + .HasName("PK_profile_loadout"); + + b.HasIndex("ProfileLoadoutGroupId"); + + b.ToTable("profile_loadout", (string)null); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasColumnName("profile_loadout_group_id"); + + b.Property("GroupName") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("group_name"); + + b.Property("ProfileRoleLoadoutId") + .HasColumnType("INTEGER") + .HasColumnName("profile_role_loadout_id"); + + b.HasKey("Id") + .HasName("PK_profile_loadout_group"); + + b.HasIndex("ProfileRoleLoadoutId"); + + b.ToTable("profile_loadout_group", (string)null); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasColumnName("profile_role_loadout_id"); + + b.Property("ProfileId") + .HasColumnType("INTEGER") + .HasColumnName("profile_id"); + + b.Property("RoleName") + .IsRequired() + .HasColumnType("TEXT") + .HasColumnName("role_name"); + + b.HasKey("Id") + .HasName("PK_profile_role_loadout"); + + b.HasIndex("ProfileId"); + + b.ToTable("profile_role_loadout", (string)null); + }); + + modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b => + { + b.Property("PlayerUserId") + .HasColumnType("TEXT") + .HasColumnName("player_user_id"); + + b.Property("RoleId") + .HasColumnType("TEXT") + .HasColumnName("role_id"); + + b.HasKey("PlayerUserId", "RoleId") + .HasName("PK_role_whitelists"); + + b.ToTable("role_whitelists", (string)null); + }); + modelBuilder.Entity("Content.Server.Database.Round", b => { b.Property("Id") @@ -860,10 +922,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER") .HasColumnName("server_id"); - b.Property("StartDate") - .ValueGeneratedOnAdd() + b.Property("StartDate") .HasColumnType("TEXT") - .HasDefaultValue(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)) .HasColumnName("start_date"); b.HasKey("Id") @@ -1504,28 +1564,65 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("Profile"); }); - modelBuilder.Entity("Content.Server.Database.Loadout", b => + modelBuilder.Entity("Content.Server.Database.Profile", b => + { + b.HasOne("Content.Server.Database.Preference", "Preference") + .WithMany("Profiles") + .HasForeignKey("PreferenceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_profile_preference_preference_id"); + + b.Navigation("Preference"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileLoadout", b => + { + b.HasOne("Content.Server.Database.ProfileLoadoutGroup", "ProfileLoadoutGroup") + .WithMany("Loadouts") + .HasForeignKey("ProfileLoadoutGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_profile_loadout_profile_loadout_group_profile_loadout_group_id"); + + b.Navigation("ProfileLoadoutGroup"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b => + { + b.HasOne("Content.Server.Database.ProfileRoleLoadout", "ProfileRoleLoadout") + .WithMany("Groups") + .HasForeignKey("ProfileRoleLoadoutId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_profile_loadout_group_profile_role_loadout_profile_role_loadout_id"); + + b.Navigation("ProfileRoleLoadout"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b => { b.HasOne("Content.Server.Database.Profile", "Profile") .WithMany("Loadouts") .HasForeignKey("ProfileId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("FK_loadout_profile_profile_id"); + .HasConstraintName("FK_profile_role_loadout_profile_profile_id"); b.Navigation("Profile"); }); - modelBuilder.Entity("Content.Server.Database.Profile", b => + modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b => { - b.HasOne("Content.Server.Database.Preference", "Preference") - .WithMany("Profiles") - .HasForeignKey("PreferenceId") + b.HasOne("Content.Server.Database.Player", "Player") + .WithMany("JobWhitelists") + .HasForeignKey("PlayerUserId") + .HasPrincipalKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() - .HasConstraintName("FK_profile_preference_preference_id"); + .HasConstraintName("FK_role_whitelists_player_player_user_id"); - b.Navigation("Preference"); + b.Navigation("Player"); }); modelBuilder.Entity("Content.Server.Database.Round", b => @@ -1727,6 +1824,8 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("AdminWatchlistsLastEdited"); b.Navigation("AdminWatchlistsReceived"); + + b.Navigation("JobWhitelists"); }); modelBuilder.Entity("Content.Server.Database.Preference", b => @@ -1745,6 +1844,16 @@ protected override void BuildTargetModel(ModelBuilder modelBuilder) b.Navigation("Traits"); }); + modelBuilder.Entity("Content.Server.Database.ProfileLoadoutGroup", b => + { + b.Navigation("Loadouts"); + }); + + modelBuilder.Entity("Content.Server.Database.ProfileRoleLoadout", b => + { + b.Navigation("Groups"); + }); + modelBuilder.Entity("Content.Server.Database.Round", b => { b.Navigation("AdminLogs"); diff --git a/Content.Server.Database/Model.cs b/Content.Server.Database/Model.cs index ba40b5ba08b6..14bd7f4bcb8e 100644 --- a/Content.Server.Database/Model.cs +++ b/Content.Server.Database/Model.cs @@ -47,6 +47,7 @@ protected ServerDbContext(DbContextOptions options) : base(options) public DbSet AdminMessages { get; set; } = null!; public DbSet BanTemplate { get; set; } = null!; public DbSet RoleWhitelists { get; set; } = null!; + public DbSet BanTemplate { get; set; } = null!; protected override void OnModelCreating(ModelBuilder modelBuilder) {