mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
More fixes and removing RMC specific references and perks
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Client._RMC14.LinkAccount;
|
||||
using Content.Client._DV.AccountLinking;
|
||||
using Content.Client.Guidebook;
|
||||
using Content.Client.Humanoid;
|
||||
using Content.Client.Inventory;
|
||||
@@ -201,7 +201,6 @@ public sealed class LobbyUIController : UIController, IOnStateEntered<LobbyState
|
||||
_profileEditor?.RefreshAntags();
|
||||
_profileEditor?.RefreshJobs();
|
||||
_profileEditor?.RefreshLoadouts();
|
||||
_profileEditor?.RefreshRMC(_linkAccount.Tier);
|
||||
}
|
||||
|
||||
private void SaveProfile()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Linq;
|
||||
using Content.Client._RMC14.LinkAccount;
|
||||
using Content.Client._DV.AccountLinking;
|
||||
using Content.Client.UserInterface.Screens;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared._EE.CCVars; // EE - chat stack
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
using Content.Client.Lobby;
|
||||
using Content.Client.UserInterface.Systems.Info;
|
||||
using Content.Shared.CCVar;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controllers;
|
||||
using Robust.Shared.Configuration;
|
||||
|
||||
namespace Content.Client._DV.AccountLinking;
|
||||
|
||||
public sealed class DiscordLinkingUIController : UIController, IOnStateEntered<LobbyState>
|
||||
{
|
||||
[Dependency] private readonly IConfigurationManager _config = default!;
|
||||
[Dependency] private readonly InfoUIController _infoUIController = default!;
|
||||
[Dependency] private readonly IUriOpener _uriOpener = default!;
|
||||
|
||||
private bool _shown;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
_infoUIController.Accepted += OnAccepted;
|
||||
}
|
||||
|
||||
public void OnStateEntered(LobbyState state)
|
||||
{
|
||||
if (_shown)
|
||||
return;
|
||||
|
||||
//if (_infoUIController.RulesPopup != null)
|
||||
// return;
|
||||
|
||||
InitButtons();
|
||||
}
|
||||
|
||||
public void InitButtons()
|
||||
{
|
||||
|
||||
_shown = true;
|
||||
if (_config.GetCVar(CCVars.InfoLinksDiscord) is { Length: > 0 } discordLink)
|
||||
{
|
||||
// TODO: Discord Linking - Window
|
||||
_window.DiscordButton.Visible = true;
|
||||
_window.DiscordButton.OnPressed += _ => _uriOpener.OpenUri(discordLink);
|
||||
}
|
||||
|
||||
if (_config.GetCVar(CCVars.InfoLinksPatreon) is { Length: > 0 } patreonLink)
|
||||
{
|
||||
_window.PatreonButton.Visible = true;
|
||||
_window.PatreonButton.OnPressed += _ => _uriOpener.OpenUri(patreonLink);
|
||||
}
|
||||
|
||||
_window.OpenCentered();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// using Content.Client.Lobby;
|
||||
// using Content.Client.UserInterface.Systems.Info;
|
||||
// using Content.Shared.CCVar;
|
||||
// using Robust.Client.UserInterface;
|
||||
// using Robust.Client.UserInterface.Controllers;
|
||||
// using Robust.Shared.Configuration;
|
||||
|
||||
// namespace Content.Client._DV.AccountLinking;
|
||||
|
||||
// public sealed class DiscordLinkingUIController : UIController, IOnStateEntered<LobbyState>
|
||||
// {
|
||||
// [Dependency] private readonly IConfigurationManager _config = default!;
|
||||
// [Dependency] private readonly InfoUIController _infoUIController = default!;
|
||||
// [Dependency] private readonly IUriOpener _uriOpener = default!;
|
||||
|
||||
// private bool _shown;
|
||||
|
||||
// public override void Initialize()
|
||||
// {
|
||||
// base.Initialize();
|
||||
// _infoUIController.Accepted += OnAccepted;
|
||||
// }
|
||||
|
||||
// public void OnStateEntered(LobbyState state)
|
||||
// {
|
||||
// if (_shown)
|
||||
// return;
|
||||
|
||||
// //if (_infoUIController.RulesPopup != null)
|
||||
// // return;
|
||||
|
||||
// InitButtons();
|
||||
// }
|
||||
|
||||
// public void InitButtons()
|
||||
// {
|
||||
|
||||
// _shown = true;
|
||||
// if (_config.GetCVar(CCVars.InfoLinksDiscord) is { Length: > 0 } discordLink)
|
||||
// {
|
||||
// // TODO: Discord Linking - Window
|
||||
// _window.DiscordButton.Visible = true;
|
||||
// _window.DiscordButton.OnPressed += _ => _uriOpener.OpenUri(discordLink);
|
||||
// }
|
||||
|
||||
// if (_config.GetCVar(CCVars.InfoLinksPatreon) is { Length: > 0 } patreonLink)
|
||||
// {
|
||||
// _window.PatreonButton.Visible = true;
|
||||
// _window.PatreonButton.OnPressed += _ => _uriOpener.OpenUri(patreonLink);
|
||||
// }
|
||||
|
||||
// _window.OpenCentered();
|
||||
// }
|
||||
// }
|
||||
@@ -0,0 +1,5 @@
|
||||
using Content.Shared._DV.AccountLinking;
|
||||
|
||||
namespace Content.Client._DV.AccountLinking;
|
||||
|
||||
public sealed class LinkAccountSystem : EntitySystem;
|
||||
@@ -7,13 +7,10 @@ using Robust.Client.UserInterface.Controllers;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
using static Robust.Client.UserInterface.Controls.LineEdit;
|
||||
using static Robust.Client.UserInterface.Controls.TabContainer;
|
||||
|
||||
namespace Content.Client._DV.AccountLinking;
|
||||
|
||||
public sealed class LinkAccountUIController : UIController, IOnSystemChanged<LinkAccountSystem>
|
||||
public sealed class LinkAccountUIController : UIController //, IOnSystemChanged<LinkAccountSystem>
|
||||
{
|
||||
[Dependency] private readonly IClipboardManager _clipboard = default!;
|
||||
[Dependency] private readonly IConfigurationManager _config = default!;
|
||||
|
||||
@@ -99,7 +99,7 @@ public sealed class CommandHandler(DiscordSocketClient client, CommandService co
|
||||
if (discord?.LinkedAccount is { } linked)
|
||||
{
|
||||
if (linked.Player.Patron is { } patron)
|
||||
db.DeltaVPatrons.Remove(patron);
|
||||
db.Patrons.Remove(patron);
|
||||
|
||||
linked.Player.Patron = null;
|
||||
db.DiscordLinkedAccounts.Remove(linked);
|
||||
@@ -110,7 +110,7 @@ public sealed class CommandHandler(DiscordSocketClient client, CommandService co
|
||||
discord.LinkedAccount.Player = codes.Player;
|
||||
|
||||
var roles = client.GetGuild(guildId).GetUser(authorId).Roles.Select(r => r.Id).ToArray();
|
||||
var tiers = await db.DeltaVPatronTiers
|
||||
var tiers = await db.PatronTiers
|
||||
.Where(t => roles.Contains(t.DiscordRole))
|
||||
.ToListAsync();
|
||||
if (tiers.Count == 0)
|
||||
@@ -121,7 +121,7 @@ public sealed class CommandHandler(DiscordSocketClient client, CommandService co
|
||||
{
|
||||
tiers.Sort((a, b) => a.Priority.CompareTo(b.Priority));
|
||||
var tier = tiers[0];
|
||||
discord.LinkedAccount.Player.Patron = db.DeltaVPatrons.Add(new DeltaVPatron { Tier = tier }).Entity;
|
||||
discord.LinkedAccount.Player.Patron = db.Patrons.Add(new DeltaVPatron { Tier = tier }).Entity;
|
||||
discord.LinkedAccount.Player.Patron.Tier = tier;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<WarningsAsErrors>nullable</WarningsAsErrors>
|
||||
|
||||
+8
-8
@@ -993,12 +993,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -1006,7 +1006,7 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
@@ -1015,9 +1015,9 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1789,14 +1789,14 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
@@ -24,20 +24,16 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "discord_patron_tiers",
|
||||
name: "patreon_tiers",
|
||||
columns: table => new
|
||||
{
|
||||
discord_patron_tiers_id = table.Column<int>(type: "integer", nullable: false)
|
||||
patreon_tiers_id = table.Column<int>(type: "integer", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
show_on_credits = table.Column<bool>(type: "boolean", nullable: false),
|
||||
named_items = table.Column<bool>(type: "boolean", nullable: false),
|
||||
figurines = table.Column<bool>(type: "boolean", nullable: false),
|
||||
lobby_message = table.Column<bool>(type: "boolean", nullable: false),
|
||||
round_end_shoutout = table.Column<bool>(type: "boolean", nullable: false)
|
||||
show_on_credits = table.Column<bool>(type: "boolean", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_discord_patron_tiers", x => x.discord_patron_tiers_id);
|
||||
table.PrimaryKey("PK_patreon_tiers", x => x.patreon_tiers_id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@@ -65,7 +61,7 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "discord_patrons",
|
||||
name: "patreon_patrons",
|
||||
columns: table => new
|
||||
{
|
||||
player_id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
@@ -73,18 +69,18 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_discord_patrons", x => x.player_id);
|
||||
table.PrimaryKey("PK_patreon_patrons", x => x.player_id);
|
||||
table.ForeignKey(
|
||||
name: "FK_discord_patrons_player_player_id",
|
||||
name: "FK_patreon_patrons_player_player_id",
|
||||
column: x => x.player_id,
|
||||
principalTable: "player",
|
||||
principalColumn: "user_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_discord_patrons_discord_patron_tiers_tier_id",
|
||||
name: "FK_patreon_patrons_patreon_tiers_tier_id",
|
||||
column: x => x.tier_id,
|
||||
principalTable: "discord_patron_tiers",
|
||||
principalColumn: "discord_patron_tiers_id",
|
||||
principalTable: "patreon_tiers",
|
||||
principalColumn: "patreon_tiers_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
@@ -95,8 +91,8 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_discord_patrons_tier_id",
|
||||
table: "discord_patrons",
|
||||
name: "IX_patreon_patrons_tier_id",
|
||||
table: "patreon_patrons",
|
||||
column: "tier_id");
|
||||
}
|
||||
|
||||
@@ -107,13 +103,13 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
name: "discord_linked_accounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "discord_patrons");
|
||||
name: "patreon_patrons");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "discord_accounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "discord_patron_tiers");
|
||||
name: "patreon_tiers");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+8
-8
@@ -993,12 +993,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -1006,7 +1006,7 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
@@ -1028,12 +1028,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1805,14 +1805,14 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
+10
-10
@@ -12,28 +12,28 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "discord_role",
|
||||
table: "discord_patron_tiers",
|
||||
table: "patreon_tiers",
|
||||
type: "numeric(20,0)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "name",
|
||||
table: "discord_patron_tiers",
|
||||
table: "patreon_tiers",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "priority",
|
||||
table: "discord_patron_tiers",
|
||||
table: "patreon_tiers",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_discord_patron_tiers_discord_role",
|
||||
table: "discord_patron_tiers",
|
||||
name: "IX_patreon_tiers_discord_role",
|
||||
table: "patreon_tiers",
|
||||
column: "discord_role",
|
||||
unique: true);
|
||||
}
|
||||
@@ -42,20 +42,20 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_discord_patron_tiers_discord_role",
|
||||
table: "discord_patron_tiers");
|
||||
name: "IX_patreon_tiers_discord_role",
|
||||
table: "patreon_tiers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "discord_role",
|
||||
table: "discord_patron_tiers");
|
||||
table: "patreon_tiers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "name",
|
||||
table: "discord_patron_tiers");
|
||||
table: "patreon_tiers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "priority",
|
||||
table: "discord_patron_tiers");
|
||||
table: "patreon_tiers");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -1017,12 +1017,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -1030,7 +1030,7 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
@@ -1052,12 +1052,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1842,14 +1842,14 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
+8
-8
@@ -1016,12 +1016,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -1029,7 +1029,7 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
@@ -1051,12 +1051,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1841,14 +1841,14 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
Generated
+8
-8
@@ -1052,12 +1052,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -1065,7 +1065,7 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
@@ -1087,12 +1087,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1899,14 +1899,14 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
+8
-17
@@ -1208,12 +1208,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -1221,7 +1221,7 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
@@ -1243,12 +1243,12 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -2141,14 +2141,14 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
@@ -2476,15 +2476,6 @@ namespace Content.Server.Database.Migrations.Postgres
|
||||
b.Navigation("LinkedAccountLogs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatron", b =>
|
||||
{
|
||||
b.Navigation("LobbyMessage");
|
||||
|
||||
b.Navigation("RoundEndMarineShoutout");
|
||||
|
||||
b.Navigation("RoundEndXenoShoutout");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
{
|
||||
b.Navigation("Patrons");
|
||||
|
||||
+8
-8
@@ -938,12 +938,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -951,16 +951,16 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
b.Property<bool>("ShowOnCredits")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1710,14 +1710,14 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
@@ -24,20 +24,16 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "discord_patron_tiers",
|
||||
name: "patreon_tiers",
|
||||
columns: table => new
|
||||
{
|
||||
discord_patron_tiers_id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
patreon_tiers_id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
show_on_credits = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
named_items = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
figurines = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
lobby_message = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
round_end_shoutout = table.Column<bool>(type: "INTEGER", nullable: false)
|
||||
show_on_credits = table.Column<bool>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_discord_patron_tiers", x => x.discord_patron_tiers_id);
|
||||
table.PrimaryKey("PK_patreon_tiers", x => x.patreon_tiers_id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
@@ -65,7 +61,7 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "discord_patrons",
|
||||
name: "patreon_patrons",
|
||||
columns: table => new
|
||||
{
|
||||
player_id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
@@ -73,18 +69,18 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_discord_patrons", x => x.player_id);
|
||||
table.PrimaryKey("PK_patreon_patrons", x => x.player_id);
|
||||
table.ForeignKey(
|
||||
name: "FK_discord_patrons_player_player_id",
|
||||
name: "FK_patreon_patrons_player_player_id",
|
||||
column: x => x.player_id,
|
||||
principalTable: "player",
|
||||
principalColumn: "user_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_discord_patrons_discord_patron_tiers_tier_id",
|
||||
name: "FK_patreon_patrons_patreon_tiers_tier_id",
|
||||
column: x => x.tier_id,
|
||||
principalTable: "discord_patron_tiers",
|
||||
principalColumn: "discord_patron_tiers_id",
|
||||
principalTable: "patreon_tiers",
|
||||
principalColumn: "patreon_tiers_id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
@@ -95,8 +91,8 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_discord_patrons_tier_id",
|
||||
table: "discord_patrons",
|
||||
name: "IX_patreon_patrons_tier_id",
|
||||
table: "patreon_patrons",
|
||||
column: "tier_id");
|
||||
}
|
||||
|
||||
@@ -107,13 +103,13 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
name: "discord_linked_accounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "discord_patrons");
|
||||
name: "patreon_patrons");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "discord_accounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "discord_patron_tiers");
|
||||
name: "patreon_tiers");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+8
-8
@@ -938,12 +938,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -951,7 +951,7 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
b.Property<ulong>("DiscordRole")
|
||||
.HasColumnType("INTEGER")
|
||||
@@ -971,12 +971,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1726,14 +1726,14 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
+10
-10
@@ -12,28 +12,28 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
migrationBuilder.AddColumn<ulong>(
|
||||
name: "discord_role",
|
||||
table: "discord_patron_tiers",
|
||||
table: "patreon_tiers",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0ul);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "name",
|
||||
table: "discord_patron_tiers",
|
||||
table: "patreon_tiers",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "priority",
|
||||
table: "discord_patron_tiers",
|
||||
table: "patreon_tiers",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_discord_patron_tiers_discord_role",
|
||||
table: "discord_patron_tiers",
|
||||
name: "IX_patreon_tiers_discord_role",
|
||||
table: "patreon_tiers",
|
||||
column: "discord_role",
|
||||
unique: true);
|
||||
}
|
||||
@@ -42,20 +42,20 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_discord_patron_tiers_discord_role",
|
||||
table: "discord_patron_tiers");
|
||||
name: "IX_patreon_tiers_discord_role",
|
||||
table: "patreon_tiers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "discord_role",
|
||||
table: "discord_patron_tiers");
|
||||
table: "patreon_tiers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "name",
|
||||
table: "discord_patron_tiers");
|
||||
table: "patreon_tiers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "priority",
|
||||
table: "discord_patron_tiers");
|
||||
table: "patreon_tiers");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+8
-8
@@ -962,12 +962,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -975,7 +975,7 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
b.Property<ulong>("DiscordRole")
|
||||
.HasColumnType("INTEGER")
|
||||
@@ -995,12 +995,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1763,14 +1763,14 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
+8
-8
@@ -961,12 +961,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -974,7 +974,7 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
b.Property<ulong>("DiscordRole")
|
||||
.HasColumnType("INTEGER")
|
||||
@@ -994,12 +994,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1762,14 +1762,14 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
+8
-8
@@ -995,12 +995,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.DeltaVPatronTier", b =>
|
||||
@@ -1008,7 +1008,7 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
b.Property<ulong>("DiscordRole")
|
||||
.HasColumnType("INTEGER")
|
||||
@@ -1028,12 +1028,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -1818,14 +1818,14 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
@@ -1147,12 +1147,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("tier_id");
|
||||
|
||||
b.HasKey("PlayerId")
|
||||
.HasName("PK_discord_patrons");
|
||||
.HasName("PK_patreon_patrons");
|
||||
|
||||
b.HasIndex("TierId")
|
||||
.HasDatabaseName("IX_discord_patrons_tier_id");
|
||||
.HasDatabaseName("IX_patreon_patrons_tier_id");
|
||||
|
||||
b.ToTable("discord_patrons", (string)null);
|
||||
b.ToTable("patreon_patrons", (string)null);
|
||||
});
|
||||
|
||||
|
||||
@@ -1162,16 +1162,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("discord_patron_tiers_id");
|
||||
.HasColumnName("patreon_tiers_id");
|
||||
|
||||
b.Property<ulong>("DiscordRole")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("discord_role");
|
||||
|
||||
b.Property<bool>("Figurines")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("figurines");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
@@ -1186,12 +1182,12 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnName("show_on_credits");
|
||||
|
||||
b.HasKey("Id")
|
||||
.HasName("PK_discord_patron_tiers");
|
||||
.HasName("PK_patreon_tiers");
|
||||
|
||||
b.HasIndex("DiscordRole")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("discord_patron_tiers", (string)null);
|
||||
b.ToTable("patreon_tiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Content.Server.Database.RoleWhitelist", b =>
|
||||
@@ -2062,14 +2058,14 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasPrincipalKey("Content.Server.Database.Player", "UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_player_player_id");
|
||||
.HasConstraintName("FK_patreon_patrons_player_player_id");
|
||||
|
||||
b.HasOne("Content.Server.Database.DeltaVPatronTier", "Tier")
|
||||
.WithMany("Patrons")
|
||||
.HasForeignKey("TierId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("FK_discord_patrons_discord_patron_tiers_tier_id");
|
||||
.HasConstraintName("FK_patreon_patrons_patreon_tiers_tier_id");
|
||||
|
||||
b.Navigation("Player");
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Content.Server.Database
|
||||
public DbSet<DiscordLinkedAccount> DiscordLinkedAccounts { get; set; } = default!;
|
||||
public DbSet<DeltaVPatronTier> PatronTiers { get; set; } = default!;
|
||||
public DbSet<DeltaVPatron> Patrons { get; set; } = default!;
|
||||
public DbSet<LinkingCodes> DiscordLinkingCodes { get; set; } = default!;
|
||||
public DbSet<DiscordLinkingCodes> DiscordLinkingCodes { get; set; } = default!;
|
||||
public DbSet<DiscordLinkedAccountLogs> DiscordLinkedAccountLogs { get; set; } = default!;
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
|
||||
@@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace Content.Server.Database;
|
||||
|
||||
//TODO
|
||||
[Table("rmc_discord_accounts")]
|
||||
[Table("discord_accounts")]
|
||||
public sealed class DiscordAccount
|
||||
{
|
||||
[Key]
|
||||
@@ -30,7 +30,7 @@ public sealed class DiscordLinkedAccount
|
||||
public DiscordAccount Discord { get; set; } = default!;
|
||||
}
|
||||
|
||||
[Table("discord_patron_tiers")]
|
||||
[Table("patreon_tiers")]
|
||||
public sealed class DeltaVPatronTier
|
||||
{
|
||||
[Key]
|
||||
@@ -47,8 +47,8 @@ public sealed class DeltaVPatronTier
|
||||
public List<DeltaVPatron> Patrons { get; set; } = default!;
|
||||
}
|
||||
|
||||
// TODO: Discord Linking - Do we name this discord_patrons? I dont think its referencing the discord ID at all
|
||||
[Table("discord_patrons")]
|
||||
// TODO: Discord Linking - Do we name this patreon_patrons? I dont think its referencing the discord ID at all
|
||||
[Table("patreon_patrons")]
|
||||
[Index(nameof(TierId))]
|
||||
public sealed class DeltaVPatron
|
||||
{
|
||||
|
||||
@@ -1962,11 +1962,8 @@ INSERT INTO player_round (players_id, rounds_id) VALUES ({players[player]}, {id}
|
||||
public async Task<DeltaVPatron?> GetPatron(Guid player, CancellationToken cancel)
|
||||
{
|
||||
await using var db = await GetDb(cancel);
|
||||
var patron = await db.DbContext.DeltaVPatrons
|
||||
var patron = await db.DbContext.Patrons
|
||||
.Include(p => p.Tier)
|
||||
.Include(p => p.LobbyMessage)
|
||||
.Include(p => p.RoundEndMarineShoutout)
|
||||
.Include(p => p.RoundEndXenoShoutout)
|
||||
.FirstOrDefaultAsync(p => p.PlayerId == player, cancellationToken: cancel);
|
||||
return patron;
|
||||
}
|
||||
@@ -1974,7 +1971,7 @@ INSERT INTO player_round (players_id, rounds_id) VALUES ({players[player]}, {id}
|
||||
public async Task<List<DeltaVPatron>> GetAllPatrons()
|
||||
{
|
||||
await using var db = await GetDb();
|
||||
return await db.DbContext.DeltaVPatrons
|
||||
return await db.DbContext.Patrons
|
||||
.Include(p => p.Player)
|
||||
.Include(p => p.Tier)
|
||||
.ToListAsync();
|
||||
|
||||
@@ -5,8 +5,5 @@ namespace Content.Shared._DV.AccountLinking;
|
||||
[Serializable, NetSerializable]
|
||||
public sealed record SharedDeltaVPatronTier(
|
||||
bool ShowOnCredits,
|
||||
bool Figurines,
|
||||
bool LobbyMessage,
|
||||
bool RoundEndShoutout,
|
||||
string Tier
|
||||
);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
</Folder>
|
||||
<Project Path="Content.Benchmarks/Content.Benchmarks.csproj" />
|
||||
<Project Path="Content.Client/Content.Client.csproj" />
|
||||
<Project Path="Content.DiscordBot/Content.DiscordBot.csproj" />
|
||||
<Project Path="Content.IntegrationTests/Content.IntegrationTests.csproj" />
|
||||
<Project Path="Content.MapRenderer/Content.MapRenderer.csproj" />
|
||||
<Project Path="Content.Packaging/Content.Packaging.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user